aboutsummaryrefslogtreecommitdiff
path: root/log.c (follow)
Commit message (Collapse)AuthorAgeLines
* log: don’t default to syslog enabledDaniel Eklöf2022-12-02-2/+7
| | | | | | | | | | | | Initialize the global ‘do_syslog’ variable to false. This ensures any log calls done before log_init() has been called (e.g. unit tests) doesn’t syslog anything. As a side effect, such log calls no longer open an implicit syslog file descriptor; this is how this “bug” was found: valgrind detected an unclosed file descriptor at exit. Finally, completely disable syslogging if log-level is “none”.
* log: simplify Boolean logic for setting "colorize" var in log_init()Craig Barnes2021-09-15-1/+1
|
* log: add LOG_CLASS_NONE and use as initializer for log_levelCraig Barnes2021-06-26-43/+45
| | | | | | | | | | | | 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.
* log: add va_list versions of log_* functionsDaniel Eklöf2021-05-07-27/+51
|
* errno: don’t use ‘_errno’ as a variable name; _ are reserved for use as identifiersDaniel Eklöf2021-02-21-3/+3
|
* main: client: factor out some common code for "--log-level" optionCraig Barnes2021-02-11-0/+40
|
* log: log-level applies to messages logged to stderr tooDaniel Eklöf2021-02-09-2/+7
|
* debug: rename assert() to xassert(), to avoid clashing with <assert.h>Craig Barnes2021-01-16-2/+2
|
* Print stack trace on assert() failure or when calling fatal_error()Craig Barnes2021-01-16-6/+6
| | | | | | Note: this uses the __sanitizer_print_stack_trace() function from the AddressSanitizer runtime, so it only works when AddressSanitizer is in use.
* Replace GCC "unused" and "format" attributes with portable macrosCraig Barnes2020-08-07-2/+1
|
* log: simplify _sys_log() functionCraig Barnes2020-08-06-25/+6
|
* Replace non-portable "\e" escape in string literals with "\033"Craig Barnes2020-08-02-4/+4
|
* log: always log file:linenoDaniel Eklöf2020-02-16-4/+0
|
* main: add --print-pid=FILE|FDDaniel Eklöf2020-02-05-10/+15
| | | | | When specified, our PID is written to the specified file (or FD), after we've successfully started up.
* log: log to stderr, not stdoutDaniel Eklöf2020-02-04-9/+9
|
* log: caller can control syslog levelDaniel Eklöf2019-12-17-3/+15
|
* log: set syslog facility to LOG_DAEMON when run in server modeDaniel Eklöf2019-11-20-5/+10
|
* scan-build: fix a couple of minor warnings from a scan-build runDaniel Eklöf2019-11-05-1/+1
|
* log: syslog: tag unused function arguments as unusedDaniel Eklöf2019-07-30-2/+4
|
* log: log to syslog tooDaniel Eklöf2019-07-30-3/+66
|
* log: don't syslogDaniel Eklöf2019-06-29-66/+3
|
* initial commit: maps an XDG toplevel windowDaniel Eklöf2019-06-12-0/+146