]> git.puffer.fish Git - mirror/frr.git/commitdiff
[tests] test-sig.c: configure logging
authorPaul Jakma <paul.jakma@sun.com>
Sun, 28 May 2006 08:31:17 +0000 (08:31 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Sun, 28 May 2006 08:31:17 +0000 (08:31 +0000)
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.

tests/ChangeLog
tests/test-sig.c

index 8f6e0ce849a15980391c67a3784849c8c0d71fa5..74118e63c3bfa5a48beef871c84b870fea1c808f 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2006-03-16 Paul Jakma <paul.jakma@sun.com>
 
        * heavy-wq.c: (heavy_wq_init) delay is gone from workqueue
index 69c0b721c4e49138a93a96785a39a57920818e30..4cb74da9dc53a41c91712d6946bc0eca694346fc 100644 (file)
@@ -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);