Reload config when receiving a SIGHUP
It's pretty common for loggers to reload their config when they recevie a SIGHUP. For example, the "Posit logging standard" says:
The level of logging must be configurable. There must be the ability to turn debug logging on for all or parts of the application. To make the debug logging most useful, try to allow for debug logging to be enabled without a restart. This should be done by listening for SIGHUP to reload configurations. This should work with subprocesses as well, by sending the child process the same SIGHUP signal.
It would be cool if logger supported this too.
I agree it's super helpful for services to reload their configs without restarting, but I wonder what config would be reloaded for logger?
I mean, I am not aware of any file-based configuration that we could reload, but I'm sure I'm missing something here .. so please share more details :bow:
I was thinking of LOGGER_LOG_LEVEL env var. Not super important, but it would be a nice feature to have.
There seems to be no way to listen and react to this signal from within a running R session so while it would be great I think it is off-limits for now
The alternative is to always look for the LOGGER_LOG_LEVEL env var but that also seems like a bad idea
Sounds like it's not worth it then.