summaryrefslogtreecommitdiff
path: root/lib/log/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/log/log.h')
-rw-r--r--lib/log/log.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/log/log.h b/lib/log/log.h
index 10f34be..f0da64f 100644
--- a/lib/log/log.h
+++ b/lib/log/log.h
@@ -68,6 +68,7 @@
#define log_very_verbose(args...) log_info(args)
#define log_verbose(args...) log_notice(args)
#define log_print(args...) LOG_LINE(_LOG_WARN, args)
+#define log_print_unless_silent(args...) LOG_LINE(silent_mode() ? _LOG_NOTICE : _LOG_WARN, args)
#define log_error(args...) log_err(args)
#define log_error_suppress(s, args...) log_err_suppress(s, args)
#define log_error_once(args...) log_err_once(args)
@@ -76,6 +77,8 @@
/* System call equivalents */
#define log_sys_error(x, y) \
log_err("%s: %s failed: %s", y, x, strerror(errno))
+#define log_sys_error_suppress(s, x, y) \
+ log_err_suppress(s, "%s: %s failed: %s", y, x, strerror(errno))
#define log_sys_very_verbose(x, y) \
log_info("%s: %s failed: %s", y, x, strerror(errno))
#define log_sys_debug(x, y) \