Add timestamps to management, server and agent .err logs#12967
Add timestamps to management, server and agent .err logs#12967dheeraj12347 wants to merge 1 commit intoapache:mainfrom
Conversation
|
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. |
There was a problem hiding this comment.
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 theCONSOLEappenderPatternLayoutin 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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.