file has been read and it doesn't specify any logging, log to syslog only
(if syslog is not available, then stderr).
}
void
-log_init(int debug)
+log_init(int debug, int init)
{
static struct log_config lc_stderr = { mask: ~0, terminal_flag: 1 };
static struct log_config lc_syslog = { mask: ~0 };
openlog("bird", LOG_CONS | LOG_NDELAY, LOG_DAEMON);
add_tail(current_log_list, &lc_syslog.n);
+ if (!init)
+ return;
}
#endif
log_switch(list *l)
{
if (EMPTY_LIST(*l))
- current_log_list = &init_log_list;
+ log_init(0, 0);
else
current_log_list = l;
}
parse_args(argc, argv);
if (debug_flag == 1)
log_init_debug("");
- log_init(debug_flag);
+ log_init(debug_flag, 1);
DBG("Initializing.\n");
resource_init();
/* log.c */
-void log_init(int debug);
+void log_init(int debug, int init);
void log_init_debug(char *); /* Initialize debug dump to given file (NULL=stderr, ""=off) */
void log_switch(struct list *);