Skip to content

Direct nginx logs to stdout/stderr - #111

Open
razo7 wants to merge 1 commit into
mainfrom
fix/console-logging
Open

Direct nginx logs to stdout/stderr#111
razo7 wants to merge 1 commit into
mainfrom
fix/console-logging

Conversation

@razo7

@razo7 razo7 commented Jul 11, 2026

Copy link
Copy Markdown
Member

Why we need this PR

The nginx console plugin writes nothing to stdout/stderr by default, failing the certsuite container logging best practice test (RHWA-987). Containers must emit logs to standard streams for Kubernetes log collection to work.

Changes made

Added access_log /dev/stdout; and error_log /dev/stderr warn; directives to the nginx server block in default.conf.

How to test

  1. Build and deploy the console plugin
  2. Verify nginx access and error logs appear in kubectl logs
  3. Confirm certsuite container logging test passes

Related

@openshift-ci

openshift-ci Bot commented Jul 11, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@abrugaro abrugaro left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm

The nginx console plugin writes nothing to stdout/stderr by default,
failing the certsuite container logging best practice test. Configure
access_log and error_log to write to /dev/stdout and /dev/stderr
respectively so container logs are accessible via the Kubernetes
logging API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@razo7
razo7 force-pushed the fix/console-logging branch from 6c1c36a to 88f498d Compare July 26, 2026 09:19
@openshift-ci openshift-ci Bot removed the lgtm label Jul 26, 2026
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4b412441-e68b-4e6b-b10f-bfe95cd7f6d5

📥 Commits

Reviewing files that changed from the base of the PR and between dc65403 and 88f498d.

📒 Files selected for processing (1)
  • default.conf

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Nginx access and error logs are now sent to standard output and standard error.
    • Error logging uses the warn level.
    • Server routing and caching behavior remain unchanged.

Walkthrough

Changes

Nginx logging

Layer / File(s) Summary
Configure standard-stream logging
default.conf
Adds access logging to /dev/stdout and warning-level error logging to /dev/stderr.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: slintes, mshitrit

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: directing nginx logs to standard streams.
Description check ✅ Passed The description matches the changeset and explains the logging update and motivation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/console-logging

Comment @coderabbitai help to get the list of available commands.

@razo7

razo7 commented Jul 26, 2026

Copy link
Copy Markdown
Member Author

Can you approve again @abrugaro ?

@abrugaro abrugaro left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Aug 5, 2026
@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abrugaro, razo7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants