Commit graph

20 commits

Author SHA1 Message Date
Daniel Eklöf
4fea561c6c
log: fold long line 2022-02-05 12:50:39 +01:00
Daniel Eklöf
5af070ee1d
log: LOG_ERRNO: include numeric value of errno 2021-08-21 11:08:06 +02:00
Daniel Eklöf
495a4c8fb1
log: remove unused include “debug.h” 2021-08-15 16:34:46 +02:00
Daniel Eklöf
7d3851046e
log: pull in log.{c,h} from foot 2021-08-15 11:41:12 +02:00
Daniel Eklöf
0794b453dd
log: make syslog facility and level configurable, always log filename+lineno 2020-02-20 19:49:27 +01:00
Daniel Eklöf
7397ab9457
log: make more logging options configurable
* Add --log-colorize=never|always|auto
* Add --log-no-syslog
2020-02-05 19:42:48 +01:00
Daniel Eklöf
ef98df1a95
log: log to stderr, not stdout 2020-02-04 18:27:54 +01:00
Daniel Eklöf
37266ae419 log: colorize console output only when stdout is a tty 2019-01-26 15:14:45 +01:00
Daniel Eklöf
4e03dca051 log: for now, only log errors and warnings to syslog
Eventually, this should probably be made configurable, and/or possible
to control through command line options.
2019-01-26 14:56:26 +01:00
Daniel Eklöf
735ab8daa6 log: always log to both console and syslog 2019-01-26 14:54:04 +01:00
Daniel Eklöf
89a61eed7b log: add internal function that logs to syslog
Differences to the console logger:

* No coloring
* Always use module name, not filename:line-number
2019-01-26 14:53:28 +01:00
Daniel Eklöf
453364e9f8 log: constructor/destructor to initialize/close syslog 2019-01-26 14:52:56 +01:00
Daniel Eklöf
1fe847cb4e log: remove dead code 2019-01-26 14:52:40 +01:00
Daniel Eklöf
410b7635d7 log: ensure variables are always initialized. Fixes gcc warning 2019-01-01 20:30:15 +01:00
Daniel Eklöf
0ea4e5a2d8 log: LOG_ERRNO_P(), like LOG_ERRNO(), except user provides errno value 2018-12-31 13:18:22 +01:00
Daniel Eklöf
7f2c0681a7 log: add LOG_ERRNO()
Works like LOG_ERR(), but appends a string representation of the
current errno value to the log message string.
2018-12-19 21:01:01 +01:00
Daniel Eklöf
8897e480c5 log: rename log_class() -> log_msg() 2018-12-19 20:56:26 +01:00
Daniel Eklöf
47f5c5d655 log: dim module name / file name + line number 2018-12-18 19:46:13 +01:00
Daniel Eklöf
7cc1fa9cef log.c: align module name 2018-12-18 19:41:08 +01:00
Daniel Eklöf
d516ffdda0 log: initial framework for logging things 2018-12-17 20:25:18 +01:00