Open szvincze opened 1 week ago
Hi, We also ha a reference implementation, if this signalling approach is okay with you guys
https://github.com/networkservicemesh/cmd-forwarder-vpp/pull/1171
Possible solution:
Algorithm for LOG_LEVEL:
cc @edwarnicke
Overview
Currently the log level can be configured via environment variable
NSM_LOG_LEVEL
which means the process will use the configured value for its whole lifetime. It is fine in most of the cases, but when one would like to change the log level because closer monitoring is needed, it would be expected to be able to do the change without restarting the process that would be monitored. In the vast majority of the cases the restart makes impossible the immediate monitoring action, because after the configuration change we should initiate restart and then just wait for the issue to happen again.For temporary setting it would be good if the log level could be changed via sending IPC signals to the process. For example, if we would like to monitor
forwarder-vpp
then we sendSIGUSR1
to the process and it changes its log level toTRACE
, when we captured the needed logs the original log level can be restored by sending signalSIGUSR2
.