Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing-appender: support rolling file using local time #3105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

messense
Copy link
Contributor

Motivation

Fixes #3102

Solution

Add a local-time feature to tracing-appender (just like the one in tracing-subscriber) to modify the behavior.

@messense messense requested a review from a team as a code owner October 15, 2024 05:04
#[cfg(test)]
return (self.now)();
#[cfg(feature = "local-time")]
return OffsetDateTime::now_local().unwrap_or_else(|_| OffsetDateTime::now_utc());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure about this error handling though, suggestions welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RollingFileAppender Logfile Segmentation Timezone problem
1 participant