fix(logger): make console logging opt-in via ASK262_LOG_CONSOLE

Console output is now disabled by default. Set ASK262_LOG_CONSOLE=true
to enable pretty-printed logs routed to stderr. This prevents:
- Stdio MCP protocol corruption from stdout noise
- Noisy test output during bun test runs

Also fixes misleading comments about HTTP/stdio log level defaults.
This commit is contained in:
2026-04-27 16:59:16 +05:30
parent af1daab2a8
commit 30cd83f6d4
2 changed files with 28 additions and 15 deletions
+5 -1
View File
@@ -45,9 +45,13 @@ ASK262_EMBEDDING_PROVIDER=ollama
# =============================================================================
# Log level: trace, debug, info, warn, error
# HTTP server defaults to 'debug', stdio server defaults to 'info'
# Defaults to 'debug' for file logging when not set
# ASK262_LOG_LEVEL=info
# Console logging is opt-in to avoid corrupting stdio MCP protocol and noisy tests.
# Set to 'true' to enable pretty-printed console output (goes to stderr).
# ASK262_LOG_CONSOLE=true
# Directory for log files (optional, defaults to ./logs)
# ASK262_LOG_DIR=./logs