Spaces:
Paused
Paused
Download apps/backend/src/utils/LoggerWrapper.ts from Kraft102/widgetdc-cortex: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/spaces/Kraft102/widgetdc-cortex/resolve/main/apps/backend/src/utils/LoggerWrapper.ts
- Command line
-
hf download hf://spaces/Kraft102/widgetdc-cortex/apps/backend/src/utils/LoggerWrapper.ts
-
curl -L -o LoggerWrapper.ts https://huggingface.co/spaces/Kraft102/widgetdc-cortex/resolve/main/apps/backend/src/utils/LoggerWrapper.ts
580 Bytes
| import { logger } from './logger.js'; | |
| export class Logger { | |
| private context: string; | |
| constructor(context: string) { | |
| this.context = context; | |
| } | |
| info(message: string, meta?: any) { | |
| logger.info(message, { ...meta, context: this.context }); | |
| } | |
| warn(message: string, meta?: any) { | |
| logger.warn(message, { ...meta, context: this.context }); | |
| } | |
| error(message: string, meta?: any) { | |
| logger.error(message, { ...meta, context: this.context }); | |
| } | |
| debug(message: string, meta?: any) { | |
| logger.debug(message, { ...meta, context: this.context }); | |
| } | |
| } | |