From 5dca0458a09ebc586fda49c50533976f055d8de2 Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Sat, 26 Jun 2021 22:15:09 +0100 Subject: log: add LOG_CLASS_NONE and use as initializer for log_level This means that logging will be completely disabled until log_init() has been called, which is useful to prevent log spam when running UNITTEST{} blocks in debug builds. Note that this doesn't change the default log level at runtime, which was already being set to LOG_CLASS_INFO in main.c and client.c. The new log level is also exposed to the command-line interface as `--log-level=none`, which allows disabling logging entirely. --- doc/foot.1.scd | 2 +- doc/footclient.1.scd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/foot.1.scd b/doc/foot.1.scd index 80203ad9..ab34a2dd 100644 --- a/doc/foot.1.scd +++ b/doc/foot.1.scd @@ -126,7 +126,7 @@ the foot command line This option can only be used in combination with *-s*,*--server*. -*-d*,*--log-level*={*info*,*warning*,*error*} +*-d*,*--log-level*={*info*,*warning*,*error*,*none*} Log level, used both for log output on stderr as well as syslog. Default: _info_. diff --git a/doc/footclient.1.scd b/doc/footclient.1.scd index 8cb05316..a002a899 100644 --- a/doc/footclient.1.scd +++ b/doc/footclient.1.scd @@ -69,7 +69,7 @@ terminal has terminated. Override an option set in the configuration file. If _SECTION_ is not given, defaults to _main_. -*-d*,*--log-level*={*info*,*warning*,*error*} +*-d*,*--log-level*={*info*,*warning*,*error*,*none*} Log level, used both for log output on stderr as well as syslog. Default: _info_. -- cgit v1.3