Skip to content

Limit server console logs to errors#360

Open
danshapiro wants to merge 1 commit into
mainfrom
codex/stdout-stderr-errors-only
Open

Limit server console logs to errors#360
danshapiro wants to merge 1 commit into
mainfrom
codex/stdout-stderr-errors-only

Conversation

@danshapiro
Copy link
Copy Markdown
Owner

Summary

  • Route server stdout/stderr through an error-only console stream.
  • Keep rotating debug log files at debug-level verbosity.
  • Update log separation coverage to assert console/file verbosity split.

Test Plan

  • npm run check
  • git diff --check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fdaf8a047

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/logger.ts
const shouldPrettyPrint = env !== 'production' && env !== 'test'
const consoleStream = createConsoleStream(shouldPrettyPrint)
const consoleLogger = pino(createPinoOptions(), consoleStream)
const consoleLogger = pino(createPinoOptions({ level: DEFAULT_CONSOLE_LOG_LEVEL }), consoleStream)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve debug-stream failure warnings on console

Setting consoleLogger to error here suppresses all consoleLogger.warn(...) calls from attachDebugStreamWarnings, including runtime warning/error events emitted by rotating-file-stream. In that failure mode the debug log stream can degrade or stop, but operators get no console signal because those warnings are filtered out; this is a regression from the previous behavior where these diagnostics were visible.

Useful? React with 👍 / 👎.

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.

2 participants