some work in the new api:

- log_level and save_each_line moved from Log to FileLog
- other fixes in loggers
- DirContainer from Dirs and LoadAvg had no dependencies set




git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1148 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2018-11-21 22:53:24 +00:00
parent 89d303f375
commit 491dd27ebf
18 changed files with 116 additions and 81 deletions

View File

@@ -43,8 +43,7 @@
#include "core/app.h"
#include "core/version.h"
#include "utf8/utf8.h"
#include "core/filelog.h"
#include "core/log.h"
@@ -159,10 +158,6 @@ using Winix::app;
std::srand(std::time(0));
Winix::TextStream<std::wstring> log_buffer;
Winix::Log log; // log only for main() function
log.SetLogBuffer(&log_buffer);
if( argv != 2 )
{
Winix::print_syntax();
@@ -180,6 +175,9 @@ using Winix::app;
if( !app.config.ReadConfig(true, false) ) /* errors to stdout, stdout in not closed */
return 2;
Winix::Log & log = app.GetMainLog();
app.InitLoggers();
if( app.stdout_is_closed || app.config.demonize )
app.config.log_stdout = false;
@@ -189,11 +187,6 @@ using Winix::app;
if( app.config.demonize && !app.Demonize() )
return 4;
app.InitFileLog();
log.SetFileLog(&app.file_log);
log.Init(app.config.log_level, app.config.log_save_each_line, app.config.log_request);
Winix::LogInfo(log, Winix::log3, "booting Winix", true, "");
if( !app.InitFCGI() )