Skip to content

Add timestamps to management, server and agent .err logs#12967

Open
dheeraj12347 wants to merge 1 commit intoapache:mainfrom
dheeraj12347:fix-12887-err-timestamps-clean
Open

Add timestamps to management, server and agent .err logs#12967
dheeraj12347 wants to merge 1 commit intoapache:mainfrom
dheeraj12347:fix-12887-err-timestamps-clean

Conversation

@dheeraj12347
Copy link
Copy Markdown
Contributor

This change updates the CONSOLE appender PatternLayout in:

client/conf/log4j-cloud.xml.in

server/conf/log4j-cloud.xml.in

agent/conf/log4j-cloud.xml.in

The console patterns now include %d{DEFAULT} at the beginning, matching the existing rolling file appender patterns. This ensures .err log lines (fed from console/stderr by the systemd units) include timestamps, which improves troubleshooting and aligns .err with .log, as requested in issue #12887.

Hyper-V’s log4j-cloud.xml.in already uses a timestamped console pattern and is unchanged.

Fixes #12887.

@dheeraj12347
Copy link
Copy Markdown
Contributor Author

This is a replacement for PR #12896 with the same .err timestamp change, but scoped to only the three log4j config files and based on the latest main.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates Log4j2 console appender patterns to include timestamps so systemd-captured console/stderr .err logs are timestamped and aligned with existing rolling file logs (per #12887).

Changes:

  • Prepended %d{DEFAULT} to the CONSOLE appender PatternLayout in client, server, and agent configs.
  • Minor cleanup: removed a few blank/whitespace-only lines in the XML configs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
server/conf/log4j-cloud.xml.in Adds timestamp to console log pattern; minor whitespace cleanup.
client/conf/log4j-cloud.xml.in Adds timestamp to console log pattern; minor whitespace cleanup.
agent/conf/log4j-cloud.xml.in Adds timestamp to console log pattern; removes extra blank lines between logger entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.00%. Comparing base (e2d18c0) to head (45c3bbe).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12967      +/-   ##
============================================
- Coverage     18.00%   18.00%   -0.01%     
+ Complexity    16464    16463       -1     
============================================
  Files          5977     5977              
  Lines        537726   537726              
  Branches      66026    66026              
============================================
- Hits          96839    96831       -8     
- Misses       429968   429975       +7     
- Partials      10919    10920       +1     
Flag Coverage Δ
uitests 3.52% <ø> (ø)
unittests 19.17% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

.err logs have no timestamp

2 participants