From a854cec3ba8003bc49f3b09c0e517531844ada68 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 21 Jan 2017 20:28:18 +0000 Subject: [PATCH] Make stack trace show up in log file with default settings --- contrib/epee/src/mlog.cpp | 4 ++-- src/common/stack_trace.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/epee/src/mlog.cpp b/contrib/epee/src/mlog.cpp index 37a15bbd5..ef9e26e6e 100644 --- a/contrib/epee/src/mlog.cpp +++ b/contrib/epee/src/mlog.cpp @@ -119,10 +119,10 @@ void mlog_set_log_level(int level) switch (level) { case 0: - settings = "*:FATAL,net*:FATAL,global:INFO,verify:FATAL"; + settings = "*:FATAL,net*:FATAL,global:INFO,verify:FATAL,stacktrace:INFO"; break; case 1: - settings = "*:WARNING,global:INFO"; + settings = "*:WARNING,global:INFO,stacktrace:INFO"; break; case 2: settings = "*:INFO"; diff --git a/src/common/stack_trace.cpp b/src/common/stack_trace.cpp index ce05b7e04..99e4bda2c 100644 --- a/src/common/stack_trace.cpp +++ b/src/common/stack_trace.cpp @@ -38,7 +38,7 @@ #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "stacktrace" -#define ST_LOG(x) CERROR(el::base::Writer,el::base::DispatchAction::FileOnlyLog,MONERO_DEFAULT_LOG_CATEGORY) << x +#define ST_LOG(x) CINFO(el::base::Writer,el::base::DispatchAction::FileOnlyLog,MONERO_DEFAULT_LOG_CATEGORY) << x // from http://stackoverflow.com/questions/11665829/how-can-i-print-stack-trace-for-caught-exceptions-in-c-code-injection-in-c