plog
plog copied to clipboard
Can I change log Severity at runtime by the linux command kill ?
Can I change log Severity by the linux command kill at runtime?
Such as, the current log Severity is INFO, but I want to trace more information, so I need to change the log Severity to DEBUG with the kill command and without the program restart .
Yes, you can but you need to write and register a signal handler (that will react on kill command).
void handle_signal(int signal)
{
plog::get()->setMaxSeverity(plog::verbose);
}
I suggest to take another look at asynchronous-signal safety for calls of member functions.