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: log rotate #2251

Merged
merged 3 commits into from
Oct 28, 2024
Merged

Feature: log rotate #2251

merged 3 commits into from
Oct 28, 2024

Conversation

xDimon
Copy link
Member

@xDimon xDimon commented Oct 28, 2024

Referenced issues

Needed approach to execute rotation of logs

Description of the Change

Update soralog
Add method to call log rotate
Add handler of SIGHUP to call log rotate method

Possible Drawbacks

None

Checklist Before Opening a PR

Before you open a Pull Request (PR), please make sure you've completed the following steps and confirm by answering 'Yes' to each item:

  1. Code is formatted: Have you run your code through clang-format to ensure it adheres to the project's coding standards? Yes
  2. Code is documented: Have you added comments and documentation to your code according to the guidelines in the project's contributing guidelines? Yes
  3. Self-review: Have you reviewed your own code to ensure it is free of typos, syntax errors, logical errors, and unresolved TODOs or FIXME without linking to an issue? Yes
  4. Zombienet Tests: Have you ensured that the zombienet tests are passing? Zombienet is a network simulation and testing tool used in this project. It's important to ensure that these tests pass to maintain the stability and reliability of the project. No (is not affected)

Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
@xDimon xDimon enabled auto-merge (squash) October 28, 2024 11:06
if (auto self = wp_to_myself.lock()) {
SL_TRACE(self->logger_, "Shutdown signal {} received", signal);
self->shutdown();
}
}

std::atomic_bool AppStateManagerImpl::log_rotate_signals_enabled{false};
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not move log-rotate to main() with RAII like backward::SignalHandling?

@xDimon xDimon merged commit 0a03875 into master Oct 28, 2024
12 of 13 checks passed
@xDimon xDimon deleted the feature/log_rotate branch October 28, 2024 11:34
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