refactor(logging): replace console.* with structured logger across server
Add server/logger.js - zero-dependency, level-based logger that outputs JSON in production and human-readable format in development. Controlled via LOG_LEVEL env var (debug/info/warn/error, default: info). Replaces all 100 console.log/warn/error calls in 14 server files.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
# Server
|
||||
PORT=3000
|
||||
NODE_ENV=production
|
||||
# LOG_LEVEL=info # debug, info, warn, error (default: info)
|
||||
|
||||
# Session
|
||||
SESSION_SECRET=REPLACE_WITH_A_LONG_RANDOM_STRING
|
||||
|
||||
Reference in New Issue
Block a user