summaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-04 19:45:53 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-04 19:45:53 +0200
commit2149e37c7954fd98acd54269df5f5eca78eb9d5b (patch)
tree35c87f4f64ebd81cef7f0b44ce7e82dd0951f08d /src/log.h
parentf92a18f5274ad506aed600b2ed8f4a560c510807 (diff)
manager: dump to usual debug channel on SIGUSR2, don't rely on stdin
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/log.h b/src/log.h
index 0370cb90cd..9d141dcdda 100644
--- a/src/log.h
+++ b/src/log.h
@@ -67,12 +67,23 @@ _noreturn_ void log_assert(
const char *func,
const char *format, ...) _printf_attr_(4,5);
+/* This modifies the buffer passed! */
+int log_dump_internal(
+ int level,
+ const char*file,
+ int line,
+ const char *func,
+ char *buffer);
+
#define log_debug(...) log_meta(LOG_DEBUG, __FILE__, __LINE__, __func__, __VA_ARGS__)
#define log_info(...) log_meta(LOG_INFO, __FILE__, __LINE__, __func__, __VA_ARGS__)
#define log_notice(...) log_meta(LOG_NOTICE, __FILE__, __LINE__, __func__, __VA_ARGS__)
#define log_warning(...) log_meta(LOG_WARNING, __FILE__, __LINE__, __func__, __VA_ARGS__)
#define log_error(...) log_meta(LOG_ERR, __FILE__, __LINE__, __func__, __VA_ARGS__)
+/* This modifies the buffer passed! */
+#define log_dump(level, buffer) log_dump_internal(level, __FILE__, __LINE__, __func__, buffer)
+
const char *log_target_to_string(LogTarget target);
LogTarget log_target_from_string(const char *s);