Skip to content

fix: replace console.log/warn with structured logger#755

Merged
selfcontained merged 2 commits into
mainfrom
agt_8901f20afbc6/job-debt-collector-550cd3c8
Jul 11, 2026
Merged

fix: replace console.log/warn with structured logger#755
selfcontained merged 2 commits into
mainfrom
agt_8901f20afbc6/job-debt-collector-550cd3c8

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Replaced 2× console.log in agent-lifecycle-runtime.ts (reconciliation messages) with appLog.info using structured metadata (agentId, agentName)
  • Replaced 1× console.warn in release.ts (migration evaluation fallback) with request.log.warn using structured metadata (tag, err)
  • Production server code should use the Pino-based structured logger for consistent, queryable output — console.* bypasses log levels, formatting, and transports

What qualifies as tech debt

These were the last console.log/console.warn calls in request-handling server code. The remaining console.* calls in the codebase are in startup/config code and standalone migration scripts, which is appropriate since they run before the Fastify logger is initialized.

Next run

Unsafe type cast in apps/web/src/components/app/unified-diff-view.tsx:267as unknown as MouseEvent double-cast.

🤖 Generated with Claude Code

selfcontained and others added 2 commits July 11, 2026 03:06
agent-lifecycle-runtime.ts used console.log for reconciliation messages
instead of the injected appLog. release.ts used console.warn for a
migration evaluation fallback instead of request.log. Both now use the
structured Pino logger for consistent, queryable output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Let Pino's error serializer preserve stack trace, error type, and
nested cause for the migration evaluation fallback warning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@selfcontained selfcontained merged commit 7aeefc4 into main Jul 11, 2026
1 check passed
@selfcontained selfcontained deleted the agt_8901f20afbc6/job-debt-collector-550cd3c8 branch July 11, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant