Spaces:
Running
Running
Download src/lib/server/logger.ts from huggingchat/chat-ui: direct link, hf CLI and curl.
- Browser
- Download file 342 Bytes
-
https://huggingface.co/spaces/huggingchat/chat-ui/resolve/refs%2Fpr%2F511/src/lib/server/logger.ts
- Command line
-
hf download hf://spaces/huggingchat/chat-ui@refs/pr/511/src/lib/server/logger.ts
-
curl -L -o logger.ts https://huggingface.co/spaces/huggingchat/chat-ui/resolve/refs%2Fpr%2F511/src/lib/server/logger.ts
342 Bytes
| import pino from "pino"; | |
| import { dev } from "$app/environment"; | |
| import { env } from "$env/dynamic/private"; | |
| let options: pino.LoggerOptions = {}; | |
| if (dev) { | |
| options = { | |
| transport: { | |
| target: "pino-pretty", | |
| options: { | |
| colorize: true, | |
| }, | |
| }, | |
| }; | |
| } | |
| export const logger = pino({ ...options, level: env.LOG_LEVEL ?? "info" }); | |