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.
This commit is contained in:
Craig Barnes 2021-06-26 22:15:09 +01:00
parent 0ff8f72a9d
commit 5dca0458a0
14 changed files with 113 additions and 93 deletions

View file

@ -28,7 +28,11 @@
## Unreleased
### Added
* `--log-level=none` command-line option.
### Changed
### Deprecated
### Removed
@ -40,6 +44,8 @@
### Security
### Contributors
* [craigbarnes](https://codeberg.org/craigbarnes)
## 1.8.0