-
Notifications
You must be signed in to change notification settings - Fork 158
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
A way to control which logger is used for signal handling #588
Comments
Calling Good catch regarding the CSV logger. The I'll make sure to exclude the CSV loggers from handling that error and will also look into adding an option in future versions so you can choose which logger handles the error. |
It appears that the loggers in the vector are sorted alphabetically by their names. As a result, the SignalHandler will log errors for the first element in this sorted vector. To ensure that the logger you want to log errors for is triggered in the current version, its name needs to be alphabetically first in the vector. |
This is done on master, you can choose the logger that logs the signal handler error
|
Is your feature request related to a problem? Please describe.
I'm using a single global logger for all my regular logging, plus a CSV logger. I'm using
quill::Backend::start_with_signal_handler
to make the backend catch and log crashes. However, it seems like the signal handler just finds some valid logger (which ends up being the CSV logger in my case) and logs the event there. The result is that I get no sign of the crash in my regular log, while my CSV file gets these lines, which do not adhere to the CSV format:Describe the solution you'd like
I would like to be able to either mark a specific logger as the one to use for signals, or be able to mark one or more loggers to be excluded from the signal handler.
A nice-to-have would be to flush all loggers in the signal handler and not just the one that the error is logged to.
The text was updated successfully, but these errors were encountered: