Download src/utils/telemetry/logger.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 742 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/utils/telemetry/logger.ts
- Command line
-
hf download hf://chenbhao/codev@afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/utils/telemetry/logger.ts
-
curl -L -o logger.ts https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/utils/telemetry/logger.ts
742 Bytes
| import type { DiagLogger } from '@opentelemetry/api' | |
| import { logForDebugging } from '../debug.js' | |
| import { logError } from '../log.js' | |
| export class ClaudeCodeDiagLogger implements DiagLogger { | |
| error(message: string, ..._: unknown[]) { | |
| logError(new Error(message)) | |
| logForDebugging(`[3P telemetry] OTEL diag error: ${message}`, { | |
| level: 'error', | |
| }) | |
| } | |
| warn(message: string, ..._: unknown[]) { | |
| logError(new Error(message)) | |
| logForDebugging(`[3P telemetry] OTEL diag warn: ${message}`, { | |
| level: 'warn', | |
| }) | |
| } | |
| info(_message: string, ..._args: unknown[]) { | |
| return | |
| } | |
| debug(_message: string, ..._args: unknown[]) { | |
| return | |
| } | |
| verbose(_message: string, ..._args: unknown[]) { | |
| return | |
| } | |
| } | |