diff options
| author | Andrew Tridgell <tridge@samba.org> | 2008-01-16 22:03:01 +1100 |
|---|---|---|
| committer | Andrew Tridgell <tridge@samba.org> | 2008-01-16 22:03:01 +1100 |
| commit | b62b7fcde84c503e78e65bd4ecf3abc4781af2ec (patch) | |
| tree | dc9943459a8de7a8951099ffd1eb27b666ffd8a4 /ctdb/lib/util/debug.c | |
| parent | 9f5ce343aaf817568cfe1a3b53bc6fae1e794b0d (diff) | |
added syslog support, and use a pipe to catch logging from child processes to the ctdbd logging functions
(This used to be ctdb commit 1306b04cd01e996fd1aa1159a9521f2ff7b06165)
Diffstat (limited to 'ctdb/lib/util/debug.c')
| -rw-r--r-- | ctdb/lib/util/debug.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ctdb/lib/util/debug.c b/ctdb/lib/util/debug.c index c1f1c91410..341a4a1586 100644 --- a/ctdb/lib/util/debug.c +++ b/ctdb/lib/util/debug.c @@ -22,7 +22,7 @@ #include <unistd.h> -void do_debug_v(const char *format, va_list ap) +static void _do_debug_v(const char *format, va_list ap) { struct timeval t; char *s = NULL; @@ -41,6 +41,9 @@ void do_debug_v(const char *format, va_list ap) free(s); } +/* default logging function */ +void (*do_debug_v)(const char *, va_list ap) = _do_debug_v; + void do_debug(const char *format, ...) { va_list ap; @@ -49,3 +52,4 @@ void do_debug(const char *format, ...) do_debug_v(format, ap); va_end(ap); } + |
