Add date to logs in LetsEncrypt - #4754
Conversation
Add environment variable for logging timestamp format
Added a timestamping function to log certbot output.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Let’s Encrypt container sets a full date-and-time log format. The service prefixes certbot output from stdout and stderr with timestamps while preserving the command exit status. ChangesLet’s Encrypt logging
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@letsencrypt/rootfs/etc/services.d/lets-encrypt/run`:
- Around line 31-38: Update the timestamped function to preserve the wrapped
command’s exit status: capture PIPESTATUS[0] immediately after the
output-processing pipeline completes, then explicitly return that status instead
of the while loop’s result.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2f670712-6742-490b-8a92-38115416d007
📒 Files selected for processing (2)
letsencrypt/Dockerfileletsencrypt/rootfs/etc/services.d/lets-encrypt/run
This pull request improves logging in the Let's Encrypt service by adding timestamped log lines to Certbot output. The main changes include introducing a new
timestampedfunction to prefix command output with a date and time, updating the Dockerfile to set a log timestamp format, and wrapping the Certbot invocation to use this new logging.Logging improvements:
timestampedshell function inletsencrypt/rootfs/etc/services.d/lets-encrypt/runthat prefixes each line of a command’s output with a timestamp, ensuring Certbot output is dated like other log messages.timestampedfunction, so all Certbot logs include timestamps.LOG_TIMESTAMPenvironment variable inletsencrypt/Dockerfileto control the timestamp format for logs.Summary by CodeRabbit