aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/src/mlog.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-09-25 16:54:08 +0200
committerRiccardo Spagni <ric@spagni.net>2017-09-25 16:54:08 +0200
commit32bbe62120cf458a265722f47bd5b6c830530b08 (patch)
tree4d325b3d7623a538fb4dcdbf6dced5073b0c17fb /contrib/epee/src/mlog.cpp
parentMerge pull request #2452 (diff)
parentdaemon, wallet: add --max-log-file-size option (diff)
downloadmonero-32bbe62120cf458a265722f47bd5b6c830530b08.tar.xz
Merge pull request #2456
91def9a5 daemon, wallet: add --max-log-file-size option (selsta)
Diffstat (limited to 'contrib/epee/src/mlog.cpp')
-rw-r--r--contrib/epee/src/mlog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/epee/src/mlog.cpp b/contrib/epee/src/mlog.cpp
index a3f38e677..964ba41df 100644
--- a/contrib/epee/src/mlog.cpp
+++ b/contrib/epee/src/mlog.cpp
@@ -111,7 +111,7 @@ static const char *get_default_categories(int level)
return categories;
}
-void mlog_configure(const std::string &filename_base, bool console)
+void mlog_configure(const std::string &filename_base, bool console, const std::size_t max_log_file_size)
{
el::Configurations c;
c.setGlobally(el::ConfigurationType::Filename, filename_base);
@@ -121,7 +121,7 @@ void mlog_configure(const std::string &filename_base, bool console)
log_format = MLOG_BASE_FORMAT;
c.setGlobally(el::ConfigurationType::Format, log_format);
c.setGlobally(el::ConfigurationType::ToStandardOutput, console ? "true" : "false");
- c.setGlobally(el::ConfigurationType::MaxLogFileSize, "104850000"); // 100 MB - 7600 bytes
+ c.setGlobally(el::ConfigurationType::MaxLogFileSize, std::to_string(max_log_file_size));
el::Loggers::setDefaultConfigurations(c, true);
el::Loggers::addFlag(el::LoggingFlag::HierarchicalLogging);