Closed aniongithub closed 2 years ago
Could you provide more details?
Thank you for the quick reply!
I currently add a log appender like so:
plog::init((plog::Severity)params.logLevel, _appender.get());
This effectively boils down to a call to addAppender
. How would I remove the appender I added using this method?
Ok, I think I understand what do you need.
I've added a DynamicAppender to keep the old behavior and add ability to add/remove appenders dynamically. Here is how to use it: https://github.com/SergiusTheBest/plog/blob/4c7997b15a3cdc1be9c5b574849b46e32c94a445/samples/DynamicAppender/Main.cpp#L5-L30
That's perfect, thanks for this!
I'm using plog as an internal logging library for my C API that allows users to specify log callbacks from my lib. In this case, I need the ability to remove appenders as well. This would also be true for long running microservice applications that may have clients who connect and disconnect as required and need on-demand logging capabilities.
How can I do this?
Thanks for creating plog!