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

Support changing of log level during runtime #1742

Closed
amdprophet opened this issue Jun 26, 2018 · 2 comments · Fixed by #3685
Closed

Support changing of log level during runtime #1742

amdprophet opened this issue Jun 26, 2018 · 2 comments · Fixed by #3685
Assignees
Labels
1.x parity low hanging 🍇 Things that are relatively easy to solve reviewed

Comments

@amdprophet
Copy link
Member

Add the ability to change the log level for the agent & backend during runtime. This can be very useful for debugging the daemons when they're in a bad state or an unexpected condition is occurring.

Expected Behavior

As a user I should be able to either toggle debug logging or set a specific log level for an already running daemon.

Current Behavior

Changing the log level requires a restart of the daemon.

Possible Solution

Sensu Enterprise (1.x) supports toggling debug mode by sending kill -TRAP to the pid of the daemon. In my personal opinion, it would be nice to have a more versatile approach that allows us to set a specific log level rather than just toggling debug logging.

Steps to Reproduce (for bugs)

N/A

Context

During preparation for a release, we noticed that keepalives were not functioning as expected. The daemons were not running with the debug log level and we were worried that restarting the daemon would resolve the issue (temporarily).

Your Environment

N/A

@palourde palourde added low hanging 🍇 Things that are relatively easy to solve and removed 1.x parity labels May 29, 2019
@palourde
Copy link
Contributor

For reference, logrus log level can be modified at runtime: sirupsen/logrus#425.

@annaplotkin
Copy link

annaplotkin commented Jul 15, 2019

We would like to do what Classic does which when the process is restarted, the log level goes back to the original configuration.

We would like this in both backend and agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x parity low hanging 🍇 Things that are relatively easy to solve reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants