[grade=A] DC-065: Sweep 15 console.* calls to process.stderr.write
Replace all non-logger console.error/warn calls with process.stderr.write using tagged prefixes ([AuditLogger], [CSRF], [DNS Registry], etc.) for grep-ability. All in fallback/catch paths where structured logger may be unavailable. Test updated to use jest.spyOn with try/finally for clean mock restoration. Codex grade: pass (22,402 tokens). All 1539 tests pass.
This commit is contained in:
@@ -50,7 +50,7 @@ class AutoRestartManager extends EventEmitter {
|
||||
super();
|
||||
this.ctx = ctx;
|
||||
this.log = ctx.log || console;
|
||||
this.logError = ctx.logError || ((_ctx, err) => console.error(err));
|
||||
this.logError = ctx.logError || ((_ctx, err) => process.stderr.write(`[auto-restart] ${err?.message || err}\n`));
|
||||
this.docker = ctx.docker;
|
||||
this.healthChecker = ctx.healthChecker;
|
||||
this.notification = ctx.notification;
|
||||
|
||||
@@ -41,7 +41,7 @@ class ConfigDriftDetector extends EventEmitter {
|
||||
super();
|
||||
this.ctx = ctx;
|
||||
this.log = ctx.log || console;
|
||||
this.logError = ctx.logError || ((_c, err) => console.error(err));
|
||||
this.logError = ctx.logError || ((_c, err) => process.stderr.write(`[config-drift] ${err?.message || err}\n`));
|
||||
this.docker = ctx.docker;
|
||||
this.servicesStateManager = ctx.servicesStateManager;
|
||||
this.notification = ctx.notification;
|
||||
|
||||
Reference in New Issue
Block a user