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

Check + rotate logs while logging not by scheduled task #162

Merged
merged 4 commits into from
Sep 17, 2019

Conversation

pmconrad
Copy link

@pmconrad pmconrad commented Sep 12, 2019

@abitmore abitmore added this to the core release 4.1.0 milestone Sep 16, 2019

int64_t new_file_number = now.sec_since_epoch() / _interval_seconds;
if( initializing )
_current_file_number.store( new_file_number );
Copy link
Member

Choose a reason for hiding this comment

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

If _next_file_time is atomic, we can build logic around it to replace _current_file_number, to save one member variable. ;-) The current code would work too though.

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.

3 participants