diff options
-rw-r--r-- | bgpd/bgp_main.c | 3 | ||||
-rw-r--r-- | isisd/isis_main.c | 3 | ||||
-rw-r--r-- | lib/log.h | 2 | ||||
-rw-r--r-- | ospf6d/ospf6_main.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_main.c | 3 | ||||
-rw-r--r-- | pimd/pim_main.c | 5 | ||||
-rw-r--r-- | ripd/rip_main.c | 3 | ||||
-rw-r--r-- | ripngd/ripng_main.c | 3 | ||||
-rw-r--r-- | watchquagga/watchquagga.c | 2 | ||||
-rw-r--r-- | zebra/main.c | 5 |
10 files changed, 20 insertions, 11 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index f873aba49..1f2f7f86c 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -407,6 +407,8 @@ main (int argc, char **argv) zlog_default = openzlog (progname, ZLOG_BGP, 0, LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); + zprivs_init (&bgpd_privs); + zlog_set_file (NULL, LOG_DEFAULT_FILENAME, zlog_default->default_lvl); /* BGP master init. */ bgp_master_init (); @@ -492,7 +494,6 @@ main (int argc, char **argv) /* Initializations. */ srandom (time (NULL)); signal_init (bm->master, array_size(bgp_signals), bgp_signals); - zprivs_init (&bgpd_privs); cmd_init (1); vty_init (bm->master); memory_init (); diff --git a/isisd/isis_main.c b/isisd/isis_main.c index 343c683f4..f088bc1de 100644 --- a/isisd/isis_main.c +++ b/isisd/isis_main.c @@ -244,6 +244,8 @@ main (int argc, char **argv, char **envp) zlog_default = openzlog (progname, ZLOG_ISIS, 0, LOG_CONS | LOG_NDELAY | LOG_PID, LOG_DAEMON); + zprivs_init (&isisd_privs); + zlog_set_file (NULL, LOG_DEFAULT_FILENAME , zlog_default->default_lvl); /* for reload */ _argc = argc; @@ -332,7 +334,6 @@ main (int argc, char **argv, char **envp) /* * initializations */ - zprivs_init (&isisd_privs); signal_init (master, array_size (isisd_signals), isisd_signals); cmd_init (1); vty_init (master); @@ -188,6 +188,8 @@ struct timestamp_control { char buf[QUAGGA_TIMESTAMP_LEN]; /* will contain the rendered timestamp */ }; +#define LOG_DEFAULT_FILENAME "/var/log/quagga/Quagga.log" + /* Defines for use in command construction: */ #define LOG_LEVELS "(emergencies|alerts|critical|errors|warnings|notifications|informational|debugging)" diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 84c98b885..c989a5a10 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -321,6 +321,8 @@ main (int argc, char *argv[], char *envp[]) LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); zprivs_init (&ospf6d_privs); + zlog_set_file (NULL, LOG_DEFAULT_FILENAME, zlog_default->default_lvl); + /* initialize zebra libraries */ signal_init (master, array_size(ospf6_signals), ospf6_signals); cmd_init (1); diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 62eb41e77..495ee2fd0 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -287,6 +287,8 @@ main (int argc, char **argv) zlog_default = openzlog (progname, ZLOG_OSPF, instance, LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); + zprivs_init (&ospfd_privs); + zlog_set_file (NULL, LOG_DEFAULT_FILENAME, zlog_default->default_lvl); /* OSPF master init. */ ospf_master_init (); @@ -295,7 +297,6 @@ main (int argc, char **argv) master = om->master; /* Library inits. */ - zprivs_init (&ospfd_privs); signal_init (master, array_size(ospf_signals), ospf_signals); cmd_init (1); debug_init (); diff --git a/pimd/pim_main.c b/pimd/pim_main.c index 0746b864a..b28b3d624 100644 --- a/pimd/pim_main.c +++ b/pimd/pim_main.c @@ -137,8 +137,8 @@ int main(int argc, char** argv, char** envp) { zlog_default = openzlog(progname, ZLOG_PIM, 0, LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); - zlog_set_file (NULL, "/var/log/quagga/Quagga.log", - zlog_default->default_lvl); + zprivs_init (&pimd_privs); + zlog_set_file (NULL, LOG_DEFAULT_FILENAME, zlog_default->default_lvl); /* this while just reads the options */ while (1) { @@ -197,7 +197,6 @@ int main(int argc, char** argv, char** envp) { /* * Initializations */ - zprivs_init (&pimd_privs); pim_signals_init(); cmd_init(1); vty_init(master); diff --git a/ripd/rip_main.c b/ripd/rip_main.c index a5ea36a1f..f920e809e 100644 --- a/ripd/rip_main.c +++ b/ripd/rip_main.c @@ -204,6 +204,8 @@ main (int argc, char **argv) /* First of all we need logging init. */ zlog_default = openzlog (progname, ZLOG_RIP, 0, LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); + zprivs_init (&ripd_privs); + zlog_set_file (NULL, LOG_DEFAULT_FILENAME, zlog_default->default_lvl); /* Command line option parse. */ while (1) @@ -275,7 +277,6 @@ main (int argc, char **argv) master = thread_master_create (); /* Library initialization. */ - zprivs_init (&ripd_privs); signal_init (master, array_size(ripd_signals), ripd_signals); cmd_init (1); vty_init (master); diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c index c05da0c9e..a1c71c856 100644 --- a/ripngd/ripng_main.c +++ b/ripngd/ripng_main.c @@ -203,6 +203,8 @@ main (int argc, char **argv) zlog_default = openzlog(progname, ZLOG_RIPNG, 0, LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); + zprivs_init (&ripngd_privs); + zlog_set_file (NULL, LOG_DEFAULT_FILENAME, zlog_default->default_lvl); while (1) { @@ -272,7 +274,6 @@ main (int argc, char **argv) master = thread_master_create (); /* Library inits. */ - zprivs_init (&ripngd_privs); signal_init (master, array_size(ripng_signals), ripng_signals); cmd_init (1); vty_init (master); diff --git a/watchquagga/watchquagga.c b/watchquagga/watchquagga.c index e882653e3..2a237efb6 100644 --- a/watchquagga/watchquagga.c +++ b/watchquagga/watchquagga.c @@ -1337,6 +1337,8 @@ main(int argc, char **argv) zlog_default = openzlog(progname, ZLOG_NONE, 0, LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); + zlog_set_file (NULL, LOG_DEFAULT_FILENAME, zlog_default->default_lvl); + zlog_set_level(NULL, ZLOG_DEST_MONITOR, ZLOG_DISABLED); if (daemon_mode) { diff --git a/zebra/main.c b/zebra/main.c index fe4873550..ab907f83e 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -244,6 +244,8 @@ main (int argc, char **argv) zlog_default = openzlog (progname, ZLOG_ZEBRA, 0, LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON); + zprivs_init (&zserv_privs); + zlog_set_file (NULL, LOG_DEFAULT_FILENAME, zlog_default->default_lvl); while (1) { @@ -330,9 +332,6 @@ main (int argc, char **argv) /* Make master thread emulator. */ zebrad.master = thread_master_create (); - /* privs initialise */ - zprivs_init (&zserv_privs); - /* Vty related initialize. */ signal_init (zebrad.master, array_size(zebra_signals), zebra_signals); cmd_init (1); |