summaryrefslogtreecommitdiff
path: root/src/log.c
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.c
parentf92a18f5274ad506aed600b2ed8f4a560c510807 (diff)
manager: dump to usual debug channel on SIGUSR2, don't rely on stdin
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/log.c b/src/log.c
index 04ffb62913..bf2382dfaf 100644
--- a/src/log.c
+++ b/src/log.c
@@ -357,6 +357,27 @@ static int log_dispatch(
return r;
}
+int log_dump_internal(
+ int level,
+ const char*file,
+ int line,
+ const char *func,
+ char *buffer) {
+
+ int saved_errno, r;
+
+ /* This modifies the buffer... */
+
+ if (_likely_(LOG_PRI(level) > log_max_level))
+ return 0;
+
+ saved_errno = errno;
+ r = log_dispatch(level, file, line, func, buffer);
+ errno = saved_errno;
+
+ return r;
+}
+
int log_meta(
int level,
const char*file,