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

Feature request: Support log rollover #718

Open
vpatibandla-yb opened this issue Nov 21, 2024 · 0 comments
Open

Feature request: Support log rollover #718

vpatibandla-yb opened this issue Nov 21, 2024 · 0 comments

Comments

@vpatibandla-yb
Copy link

vpatibandla-yb commented Nov 21, 2024

Today, in odyssey we do not support rollover of logs. Having the support to rollover logs can result in better management of logs. It would be great if the team can implement this feature request. The feature request should work in a multi-threaded odyssey system too i.e, multiple workers are present in odyssey.

Also, what are the ideas to be explored in case log rollover feature has to be implemented in odyssey.

  1. Should we use locks to serialize the log write behavior?
  2. The async logging in odyssey is disabled today. The reference to the disabled code is present here -
    if (logger->loaded && false) {
    . Why is this disabled? If this can be enabled and made functional, does it help in an easier implementation of log rollover operations as all the log operations are serialized operations now.

When we do support log rollover, it would be helpful to support multiple configurations on the basis on which log rollover can occur. Some of the important ones are:

  1. When the log size reaches a certain configurable value?
  2. When the log has to be rolled over at a regular interval?
  3. An optional setting can be to create a new log file at the beginning of each day i.e, 12 AM every day.

Also, when the feature is implemented it would be a good idea to have the log directory passed instead of the log file that is passed today. Odyssey can create the log file based on the creation time of the file in the specified log directory. Both the log file and log directory can also be supported together.

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

No branches or pull requests

1 participant