aboutsummaryrefslogtreecommitdiff
path: root/log.h (unfollow)
Commit message (Collapse)AuthorLines
2021-11-13config: add LOG_CONTEXTUAL_{ERR,WARN,ERRNO}Daniel Eklöf-1/+2
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.
2021-06-26log: add LOG_CLASS_NONE and use as initializer for log_levelCraig Barnes-1/+8
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.
2021-05-07log: add va_list versions of log_* functionsDaniel Eklöf-6/+22
2021-02-11main: client: factor out some common code for "--log-level" optionCraig Barnes-0/+3
2021-02-09log: log-level applies to messages logged to stderr tooDaniel Eklöf-1/+1
2020-10-10selection: use appropriate check for PRIMARY pasteSergey Nazaryev-35/+8
Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD.
2020-08-23log: include 'fmt' in __VA_ARGS__Daniel Eklöf-13/+13
This ensures all calls have at least one __VA_ARGS__ argument, thus making them ISO C99 compliant.
2020-08-07Replace GCC "unused" and "format" attributes with portable macrosCraig Barnes-3/+4
2020-02-05main: add --print-pid=FILE|FDDaniel Eklöf-1/+4
When specified, our PID is written to the specified file (or FD), after we've successfully started up.
2019-12-17log: caller can control syslog levelDaniel Eklöf-1/+1
2019-11-20log: set syslog facility to LOG_DAEMON when run in server modeDaniel Eklöf-0/+4