mirror of
https://github.com/troglobit/finit.git
synced 2026-11-07 16:01:08 +00:00
Add _w() for developer warning logs
Adjust debug levels slightly and add _w() macro for LOG_WARNING, useful when having /dev/kmsg as backend. The latter outputs any log <= LOG_ERR to console as well. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
74eb2bf4d2
commit
88d8ab67c9
2 files changed
+4
-3
No files matched your search
@@ -38,8 +38,9 @@
|
||||
* /dev/console as well. Useful for critical errors and early debug.
|
||||
*/
|
||||
#define _l(prio, fmt, args...) do { if (_slup) warnx(fmt, ##args); logit(prio, fmt "\n", ##args); } while (0)
|
||||
#define _m(prio, fmt, args...) do { _l(prio, "finit:%s:%s() - " fmt, __FILE__, __func__, ##args); } while (0)
|
||||
#define _m(prio, fmt, args...) do { _l(prio, "%s() - " fmt, __func__, ##args); } while (0)
|
||||
#define _d(fmt, args...) do { if (debug) { _m(LOG_DEBUG, fmt, ##args); } } while (0)
|
||||
#define _w(fmt, args...) do { _m(LOG_WARNING, fmt, ##args); } while (0)
|
||||
#define _e(fmt, args...) do { _m(LOG_ERR, fmt, ##args); } while (0)
|
||||
#define _pe(fmt, args...) do { _m(LOG_ERR, fmt ". Error %d: %s", ##args, errno, strerror(errno)); } while (0)
|
||||
|
||||
|
||||
Reference in new issue
Block a user