Daniel Eklöf
176b85cb10
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.
2021-11-13 11:04:28 +01:00
Craig Barnes
5dca0458a0
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.
2021-06-26 22:15:09 +01:00
Daniel Eklöf
cda55d7de4
log: add va_list versions of log_* functions
2021-05-07 16:52:56 +02:00
Craig Barnes
5437321f97
main: client: factor out some common code for "--log-level" option
2021-02-11 11:08:18 +00:00
Daniel Eklöf
208014d6c9
log: log-level applies to messages logged to stderr too
2021-02-09 20:54:17 +01:00
Daniel Eklöf
c779a5ec7d
log: include 'fmt' in __VA_ARGS__
...
This ensures all calls have at least one __VA_ARGS__ argument, thus
making them ISO C99 compliant.
2020-08-23 10:07:08 +02:00
Craig Barnes
7eb70a453b
Replace GCC "unused" and "format" attributes with portable macros
2020-08-07 20:42:34 +01:00
Daniel Eklöf
82b8853f17
main: add --print-pid=FILE|FD
...
When specified, our PID is written to the specified file (or FD),
after we've successfully started up.
2020-02-05 19:54:16 +01:00
Daniel Eklöf
a0fcec3a3d
log: caller can control syslog level
2019-12-17 19:07:28 +01:00
Daniel Eklöf
55a23a5b29
log: set syslog facility to LOG_DAEMON when run in server mode
2019-11-20 19:43:31 +01:00
Daniel Eklöf
910c540ea9
initial commit: maps an XDG toplevel window
2019-06-12 20:08:54 +02:00