bin: Use proper ISO 8601 format for logging#11463
bin: Use proper ISO 8601 format for logging#11463michael-o wants to merge 1 commit intofluent:masterfrom
Conversation
426cc30 to
7c429e5
Compare
📝 WalkthroughWalkthroughDate separators in log and dump timestamp format strings were changed from slashes (/) to dashes (-) across three source files; no other logic, control flow, or API changes were made. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c429e5ee1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
7c429e5 to
a74864a
Compare
a74864a to
7e6f4a8
Compare
Instead of using a custom format, use proper extended ISO 8601 datetime format. Signed-off-by: Michael Osipov <michael.osipov@innomotics.com>
7e6f4a8 to
42d941f
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/flb_log.c (1)
731-731: LGTM — correct date separator change.The
YYYY-MM-DDdate format is a direct improvement over the previous slash-separated form. One optional note in the context of the PR's stated goal: the resulting formatYYYY-MM-DD HH:MM:SS.nnnuses a space rather thanTas the date-time separator. Strict ISO 8601 extended format requiresT(e.g.,2026-02-14T16:48:08.479196279). RFC 3339 permits space as a human-readable substitute, so this is a deliberate trade-off rather than a bug.🔎 If strict ISO 8601 is the goal, consider `T` as separator
- "%s[%s%i-%02i-%02i %02i:%02i:%02i.%03ld%s]%s [%s%5s%s] ", + "%s[%s%i-%02i-%02iT%02i:%02i:%02i.%03ld%s]%s [%s%5s%s] ",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/flb_log.c` at line 731, The log timestamp format currently uses a space between date and time in the format string ("%s[%s%i-%02i-%02i %02i:%02i:%02i.%03ld%s]%s ..."); if you want strict ISO 8601 compliance change the separator to 'T' in that format string (i.e., replace the space between the date and time fields with 'T') so the produced timestamp reads YYYY-MM-DDTHH:MM:SS.nnn; update the format literal in src/flb_log.c where that string appears.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/flb_log.c`:
- Line 731: The log timestamp format currently uses a space between date and
time in the format string ("%s[%s%i-%02i-%02i %02i:%02i:%02i.%03ld%s]%s ...");
if you want strict ISO 8601 compliance change the separator to 'T' in that
format string (i.e., replace the space between the date and time fields with
'T') so the produced timestamp reads YYYY-MM-DDTHH:MM:SS.nnn; update the format
literal in src/flb_log.c where that string appears.
cosmo0920
left a comment
There was a problem hiding this comment.
This change could break backward compatibility. So, do we need to provide a service parameter to turn on using ISO 8601 format on log?
This can make a room to merge, I suppose.
If so, I would make if fully compliant. Unfortunately, I have no idea how to introduce a flag for this. |
Instead of using a custom format, use proper extended ISO 8601 datetime format.
Change is straight forward. Output now:
Summary by CodeRabbit