Spaces:
Configuration error
Configuration error
Download frontend/src/utils/logger.ts from prathammodels/smart-attendance-api: direct link, hf CLI and curl.
- Browser
- Download file 743 Bytes
-
https://huggingface.co/spaces/prathammodels/smart-attendance-api/resolve/main/frontend/src/utils/logger.ts
- Command line
-
hf download hf://spaces/prathammodels/smart-attendance-api/frontend/src/utils/logger.ts
-
curl -L -o logger.ts https://huggingface.co/spaces/prathammodels/smart-attendance-api/resolve/main/frontend/src/utils/logger.ts
743 Bytes
| type LogLevel = 'debug' | 'info' | 'warn' | 'error'; | |
| const PREFIX: Record<LogLevel, string> = { | |
| debug: '⚫', | |
| info: '🔵', | |
| warn: '🟡', | |
| error: '🔴', | |
| }; | |
| export const logger = { | |
| debug(message: string, ...args: unknown[]) { | |
| if (process.env.NODE_ENV === 'development') { | |
| console.debug(`${PREFIX.debug} ${message}`, ...args); | |
| } | |
| }, | |
| info(message: string, ...args: unknown[]) { | |
| if (process.env.NODE_ENV === 'development') { | |
| console.info(`${PREFIX.info} ${message}`, ...args); | |
| } | |
| }, | |
| warn(message: string, ...args: unknown[]) { | |
| console.warn(`${PREFIX.warn} ${message}`, ...args); | |
| }, | |
| error(message: string, ...args: unknown[]) { | |
| console.error(`${PREFIX.error} ${message}`, ...args); | |
| }, | |
| }; | |