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/e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/utils/telemetry/logger.ts
- Command line
-
hf download hf://chenbhao/codev@e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/utils/telemetry/logger.ts
-
curl -L -o logger.ts https://huggingface.co/chenbhao/codev/resolve/e91c8197c9918ff9e5df3140e8c36282bb30e9a2/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 | |
| } | |
| } | |