aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-08-07 15:07:46 +0200
committerRiccardo Spagni <ric@spagni.net>2017-08-07 15:07:46 +0200
commitb6ae7184563f4435475e8a3aa9809f078e15b120 (patch)
tree626943d88609c1613fd723d99567ed52b13e60cc
parentMerge pull request #2191 (diff)
parentmlog: default to msgwriter logs only for log level 1 (diff)
downloadmonero-b6ae7184563f4435475e8a3aa9809f078e15b120.tar.xz
Merge pull request #2195
599436a4 mlog: default to msgwriter logs only for log level 1 (moneromooo-monero) 58f3fc68 Make msgwriter logs go to file only (moneromooo-monero)
-rw-r--r--contrib/epee/include/misc_log_ex.h1
-rw-r--r--contrib/epee/src/mlog.cpp2
-rw-r--r--src/common/scoped_message_writer.h2
3 files changed, 3 insertions, 2 deletions
diff --git a/contrib/epee/include/misc_log_ex.h b/contrib/epee/include/misc_log_ex.h
index 6eeb1441f..ec4bcbe2d 100644
--- a/contrib/epee/include/misc_log_ex.h
+++ b/contrib/epee/include/misc_log_ex.h
@@ -60,6 +60,7 @@
#define MCDEBUG(cat,x) CLOG(DEBUG,cat) << x
#define MCTRACE(cat,x) CLOG(TRACE,cat) << x
#define MCLOG(level,cat,x) ELPP_WRITE_LOG(el::base::Writer, level, el::base::DispatchAction::NormalLog, cat) << x
+#define MCLOG_FILE(level,cat,x) ELPP_WRITE_LOG(el::base::Writer, level, el::base::DispatchAction::FileOnlyLog, cat) << x
#define MCLOG_COLOR(level,cat,color,x) MCLOG(level,cat,"\033[1;" color "m" << x << "\033[0m")
#define MCLOG_RED(level,cat,x) MCLOG_COLOR(level,cat,"31",x)
diff --git a/contrib/epee/src/mlog.cpp b/contrib/epee/src/mlog.cpp
index a51654d36..39661a1a0 100644
--- a/contrib/epee/src/mlog.cpp
+++ b/contrib/epee/src/mlog.cpp
@@ -91,7 +91,7 @@ static const char *get_default_categories(int level)
switch (level)
{
case 0:
- categories = "*:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO";
+ categories = "*:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO";
break;
case 1:
categories = "*:WARNING,global:INFO,stacktrace:INFO,logging:INFO,msgwriter:INFO";
diff --git a/src/common/scoped_message_writer.h b/src/common/scoped_message_writer.h
index 7ee4f1379..e31f8f0b2 100644
--- a/src/common/scoped_message_writer.h
+++ b/src/common/scoped_message_writer.h
@@ -91,7 +91,7 @@ public:
{
m_flush = false;
- MCLOG(m_log_level, "msgwriter", m_oss.str());
+ MCLOG_FILE(m_log_level, "msgwriter", m_oss.str());
if (epee::console_color_default == m_color)
{