logging, binkp TRF

This commit is contained in:
Sergey Dorofeev
2012-03-09 20:44:43 +04:00
parent f2d9c6e4a7
commit 441f4021c2
26 changed files with 320 additions and 308 deletions
+5 -10
View File
@@ -422,13 +422,13 @@ int main(int argc, char *argv[], char *envp[])
}
}
}
/* if( (rc = log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL)) )
/* if( (rc = log_open(BFORCE_LOGFILE, NULL, NULL)) ) //compiled in
{
log("can't continue without logging");
gotoexit(BFERR_FATALERROR);
}
*/
}*/
/* Process primary config file */
if( opts.confname && *opts.confname )
rc = conf_readconf(opts.confname, 0);
@@ -442,17 +442,12 @@ int main(int argc, char *argv[], char *envp[])
(void)conf_readconf(opts.incname, 1);
/* Reopen log file if it was defined in config */
if( log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
if( log_reopen(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
{
log("can't continue without logging");
gotoexit(BFERR_FATALERROR);
}
#ifdef DEBUG
/* Same for the debug file */
(void)debug_setfilename(log_getfilename(LOG_FILE_DEBUG));
#endif
//char runmode_str[21];
//snprintf(runmode_str, 20, "Run mode: %d", opts.runmode);
//log(runmode_str);