This issue is AI generated.
Problem
GUIDELINES.md explicitly requires: "Use server/utils/logger.js in all service and library code. Plain console.log is only acceptable in entry-point startup sequences." However, console.log, console.warn, and console.error are used directly throughout the service layer, including in security-sensitive code paths.
This matters because:
- Log level control and structured output (JSON, log levels) is centralised in
logger.js but bypassed by direct console calls.
console.log cannot be silenced or redirected per-environment without monkeypatching.
- Inconsistent log format makes automated log parsing, alerting, and audit trail reconstruction unreliable.
Evidence
Direct console.log / console.warn / console.error calls exist throughout:
server/services/ai/engine.js
server/services/ai/tools.js
server/services/messaging/telnyx.js
server/services/browser/extension/provider.js
server/services/ai/hooks.js
- (and many more —
grep -rn "console\." server/services/ | wc -l returns 200+)
Required change
Replace all direct console.* calls in server/services/ and server/lib/ with the appropriate logger.* method. Keep console.* only in server/index.js, bin/neoagent.js, and startup sequences where logger.js is not yet loaded.
Acceptance criteria
grep -rn "console\." server/services/ returns zero hits (or only justified exceptions with a comment).
- Log output is routed through
logger.js for controllable formatting.
This issue is AI generated.
Problem
GUIDELINES.md explicitly requires: "Use
server/utils/logger.jsin all service and library code. Plainconsole.logis only acceptable in entry-point startup sequences." However,console.log,console.warn, andconsole.errorare used directly throughout the service layer, including in security-sensitive code paths.This matters because:
logger.jsbut bypassed by direct console calls.console.logcannot be silenced or redirected per-environment without monkeypatching.Evidence
Direct
console.log/console.warn/console.errorcalls exist throughout:server/services/ai/engine.jsserver/services/ai/tools.jsserver/services/messaging/telnyx.jsserver/services/browser/extension/provider.jsserver/services/ai/hooks.jsgrep -rn "console\." server/services/ | wc -lreturns 200+)Required change
Replace all direct
console.*calls inserver/services/andserver/lib/with the appropriatelogger.*method. Keepconsole.*only inserver/index.js,bin/neoagent.js, and startup sequences wherelogger.jsis not yet loaded.Acceptance criteria
grep -rn "console\." server/services/returns zero hits (or only justified exceptions with a comment).logger.jsfor controllable formatting.