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

@@ -66,23 +66,38 @@ void FileLog::set_synchro(Synchro * synchro)
}
void FileLog::init(const std::wstring & log_file, bool log_stdout, size_t log_time_zone_id)
void FileLog::init(const std::wstring & log_file, bool log_stdout, int log_level, bool save_each_line, size_t log_time_zone_id)
{
this->log_stdout = log_stdout;
this->log_time_zone_id = log_time_zone_id;
this->log_level = log_level;
this->save_each_line = save_each_line;
PT::WideToUTF8(log_file, this->log_file);
// don't open the file here
// because it would be created with the root as an owner
}
void FileLog::set_time_zones(TimeZones * time_zones)
{
this->time_zones = time_zones;
}
int FileLog::get_log_level()
{
return log_level;
}
bool FileLog::should_save_each_line()
{
return save_each_line;
}
PT::Date FileLog::get_local_date(const PT::Date & date)
{
if( time_zones )