sargon / ddhcpd

A distributed DHCP Daemon
GNU General Public License v3.0
31 stars 11 forks source link

[RFC] Add dynamic runtime verbosity selection #21

Closed TobleMiner closed 6 years ago

TobleMiner commented 6 years ago

depends on #20 (first commit is from #20)

This commit adds dynamic verbosity selection to ddhcpd. It introduces a new command line option -V which increases the log level. The compile time option LOG_LEVEL has been removed and replaced by two new options:

The current log level can be queried and set through the global variable log_level.

Additionally this adds the option -Vto ddhcpdctl, too. It can be used to set the log level of ddhcpd on the fly.

Though this might be a good idea especially since we might want to debug ddhcpd on devices while they are in normal use without getting continous log spam.

TobleMiner commented 6 years ago

I've just updated this PR to fix the following issues: