Merge pull request #2189

335fc8ab mlog: fix crash accessing stale data when rotating logs (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-08-07 15:25:46 +02:00
commit b76ba219d9
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ void mlog_configure(const std::string &filename_base, bool console)
el::Loggers::addFlag(el::LoggingFlag::DisableApplicationAbortOnFatalLog);
el::Loggers::addFlag(el::LoggingFlag::ColoredTerminalOutput);
el::Loggers::addFlag(el::LoggingFlag::StrictLogFileSizeCheck);
el::Helpers::installPreRollOutCallback([&filename_base](const char *name, size_t){
el::Helpers::installPreRollOutCallback([filename_base](const char *name, size_t){
std::string rname = generate_log_filename(filename_base.c_str());
rename(name, rname.c_str());
});