Howto: Change Listener/ Notifier Loglevel on-the-fly

Howto

Change the listener/ notifier loglevel on-the-fly without restarting the service.

Environment

Usually, you change the loglevel through the ucr-variable followed by a restart of the service. i.e.:

root@master:~# ucr set listener/debug/level=4
Setting listener/debug/level
File: /etc/runit/univention-directory-listener/run
root@master:~# systemctl restart univention-directory-listener

You can change loglevel for a running process with restarting the service as follows:

Increase Loglevel

root@master:~# pkill -USR1 -f /usr/sbin/univention-directory-listener

You will see entries in the logfile /var/log/univention/listener.log:
27.08.19 13:43:40.317 LISTENER ( WARN ) : received signal 10

Decrease Loglevel

root@master:~# pkill -USR2 -f /usr/sbin/univention-directory-listener
You will see entries in the logfile /var/log/univention/listener.log:

27.08.19 13:42:07.045  LISTENER    ( WARN    ) : received signal 12
27.08.19 13:42:07.045  LISTENER    ( WARN    ) : decreasing univention_debug_level to 1
Mastodon