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:
Ulas
2026-04-03 22:05:22 +02:00
parent 5b1e6915ac
commit 3b90074723
16 changed files with 185 additions and 100 deletions
+1
View File
@@ -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