Download open-sse/utils/debugLog.js from heyeyydss/api9nin: direct link, hf CLI and curl.
- Browser
- Download file 482 Bytes
-
https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/open-sse/utils/debugLog.js
- Command line
-
hf download hf://spaces/heyeyydss/api9nin/open-sse/utils/debugLog.js
-
curl -L -o debugLog.js https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/open-sse/utils/debugLog.js
482 Bytes
| // Debug logging utility — only active in dev mode (NODE_ENV !== "production") | |
| // Outputs are tagged with [DBG:tag] for easy grep/filter | |
| const isDev = process.env.NODE_ENV !== "production"; | |
| function ts() { | |
| return new Date().toLocaleTimeString("en-US", { hour12: false, hour: "2-digit", minute: "2-digit", second: "2-digit" }); | |
| } | |
| export function dbg(tag, msg) { | |
| if (!isDev) return; | |
| console.log(`[${ts()}] 🐛 [DBG:${tag}] ${msg}`); | |
| } | |
| export const isDebugEnabled = isDev; | |