You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My team would like to have a way to enable/disable Logbook in runtime.
Context
We'd like to use ZooKeeper for the dynamic reconfiguration of our app.
Quickly disabling access log might be necessary for performance or privacy reasons.
Possible Implementation
Not sure.
Expose enable() / disable() methods on Logbook object?
Expose reconfigure() which would return a new builder()?
Your Environment
Version used: 2.2.0
Link to your project: proprietary
The text was updated successfully, but these errors were encountered:
There are already two features that allow you to do that:
Sink#isActive and HttpLogWriter#isActive
If you use the DefaultSink and the DefaultHttpLogWriter then isActive delegates to the underlying Logger and checks whether the TRACE level is being activated. Most logging frameworks allow you to change log levels at runtime.
In case you have a custom Sink implementation, you need to override isActive by hand.
Custom condition
A custom supplied condition (just a Predicate) is used for each request to determine whether logging is done or not. You can have one that has e.g. an AtomicBoolean inside that you can toggle, if needed.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Detailed Description
My team would like to have a way to enable/disable Logbook in runtime.
Context
We'd like to use ZooKeeper for the dynamic reconfiguration of our app.
Quickly disabling access log might be necessary for performance or privacy reasons.
Possible Implementation
Not sure.
Expose enable() / disable() methods on Logbook object?
Expose reconfigure() which would return a new builder()?
Your Environment
The text was updated successfully, but these errors were encountered: