Merge pull request #1604

a854cec3 Make stack trace show up in log file with default settings (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-01-22 11:41:38 -05:00
commit e12f073f65
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
2 changed files with 3 additions and 3 deletions

View file

@ -121,10 +121,10 @@ void mlog_set_log_level(int level)
switch (level) switch (level)
{ {
case 0: case 0:
settings = "*:FATAL,net*:FATAL,global:INFO,verify:FATAL"; settings = "*:FATAL,net*:FATAL,global:INFO,verify:FATAL,stacktrace:INFO";
break; break;
case 1: case 1:
settings = "*:WARNING,global:INFO"; settings = "*:WARNING,global:INFO,stacktrace:INFO";
break; break;
case 2: case 2:
settings = "*:INFO"; settings = "*:INFO";

View file

@ -38,7 +38,7 @@
#undef MONERO_DEFAULT_LOG_CATEGORY #undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "stacktrace" #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 // from http://stackoverflow.com/questions/11665829/how-can-i-print-stack-trace-for-caught-exceptions-in-c-code-injection-in-c