Commit 56cca04
committed
fix: mirror error-level logs to stderr in production
With NODE_ENV=production, the logger had no Console transport, so
logger.error(...) calls only reached the on-disk log files and were
invisible to journalctl/pm2/docker. The previous console.trace fallback
in the staging commit handler was the only thing operators saw in
systemd for that endpoint.
Add a production-only Console transport at error level with stderrLevels
so errors are written to process.stderr and picked up by the process
supervisor, without pushing verbose/info/debug traffic into journalctl.
File transports are unchanged, so the full log stream still lives on
disk.1 parent 037424f commit 56cca04
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
119 | 129 | | |
120 | 130 | | |
121 | 131 | | |
| |||
0 commit comments