From f783c1d7bcf0674920cbae066de954fe926fd3ac Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Sun, 28 May 2006 08:31:17 +0000 Subject: [tests] test-sig.c: configure logging 2006-05-28 Paul Jakma * test-sig.c: (main) configure logging, there's no terminal to write to for one thing, but we do want stdout, and we don't want a test to spam syslog. --- tests/test-sig.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/test-sig.c') diff --git a/tests/test-sig.c b/tests/test-sig.c index 69c0b721..4cb74da9 100644 --- a/tests/test-sig.c +++ b/tests/test-sig.c @@ -1,6 +1,7 @@ #include #include +#include "lib/log.h"> void sighup (void) @@ -44,7 +45,13 @@ main (void) { master = thread_master_create (); signal_init (master, Q_SIGC(sigs), sigs); - + + zlog_default = openzlog("testsig", ZLOG_NONE, + LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); + zlog_set_level (NULL, ZLOG_DEST_SYSLOG, ZLOG_DISABLED); + zlog_set_level (NULL, ZLOG_DEST_STDOUT, LOG_DEBUG); + zlog_set_level (NULL, ZLOG_DEST_MONITOR, ZLOG_DISABLED); + while (thread_fetch (master, &t)) thread_call (&t); -- cgit v1.2.1