polkit-org / polkit

polkit (formerly PolicyKit) is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes.
Other
51 stars 30 forks source link

Log levels implementation #477

Closed jrybar-rh closed 1 month ago

jrybar-rh commented 1 month ago

Summary

There was a request to being able to log every loaded .rules script. This required a change in the logging function and a new option parsed during the start of the polkit service.

Detailed description and/or reproducer

All the calls of the logging function had to be changed accordingly. The levels chosen for each such call were guessed from the message -> there might be discussions about that.
The default log level is set to "notify" in the input unit file, this equals the original logging behaviour of polkit. The default and backup value in code is set to "errors only". The "default default" logging shall be "quiet", not too "verbose", but this is always subjective.
A log message about every loaded rule file can be activated by editting the unit file and setting the log level to 3.

jrybar-rh commented 1 month ago

Merged in #482 along with LogControl support.