config: add LOG_CONTEXTUAL_{ERR,WARN,ERRNO}

These work like LOG_AND_NOTIFY_* but add contextual information: path
of the conf file, line number, section name, key/option name and the
value.
This commit is contained in:
Daniel Eklöf 2021-11-05 17:13:39 +01:00
parent 534e9d8bef
commit 176b85cb10
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 170 additions and 295 deletions

3
log.h
View file

@ -11,7 +11,8 @@ enum log_class {
LOG_CLASS_ERROR,
LOG_CLASS_WARNING,
LOG_CLASS_INFO,
LOG_CLASS_DEBUG
LOG_CLASS_DEBUG,
LOG_CLASS_COUNT,
};
void log_init(enum log_colorize colorize, bool do_syslog,