summaryrefslogtreecommitdiffstats
path: root/tests/test-sig.c
diff options
context:
space:
mode:
authorpaul <paul>2006-05-28 08:31:17 +0000
committerpaul <paul>2006-05-28 08:31:17 +0000
commit11e2cfe06e8fb850c0acbb041ce091cab3bdb71a (patch)
tree270f2798ce86bd085fa20147de879a3eaba72c54 /tests/test-sig.c
parent857ed732ab78ee19cfc6f666abad9aad9052d577 (diff)
downloadquagga-11e2cfe06e8fb850c0acbb041ce091cab3bdb71a.tar.bz2
quagga-11e2cfe06e8fb850c0acbb041ce091cab3bdb71a.tar.xz
[tests] test-sig.c: configure logging
2006-05-28 Paul Jakma <paul.jakma@sun.com> * 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.
Diffstat (limited to 'tests/test-sig.c')
-rw-r--r--tests/test-sig.c9
1 files changed, 8 insertions, 1 deletions
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 <zebra.h>
#include <sigevent.h>
+#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);