aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-04-28 22:40:28 +0200
committerRiccardo Spagni <ric@spagni.net>2018-04-28 22:40:28 +0200
commit6d8498be1f006b96b3798a63df0fa370d8421dbe (patch)
tree0e6ee0b48a86f2b192cc127e88ceb6c4c574e9eb /contrib
parentMerge pull request #3696 (diff)
parentmlog: fix setting no logs (diff)
downloadmonero-6d8498be1f006b96b3798a63df0fa370d8421dbe.tar.xz
Merge pull request #3704
e2b72da4 mlog: fix setting no logs (moneromooo-monero)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/epee/src/mlog.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/epee/src/mlog.cpp b/contrib/epee/src/mlog.cpp
index 5b9472006..fb0b4ac2b 100644
--- a/contrib/epee/src/mlog.cpp
+++ b/contrib/epee/src/mlog.cpp
@@ -202,7 +202,12 @@ void mlog_set_log(const char *log)
long level;
char *ptr = NULL;
- level = strtoll(log, &ptr, 10);
+ if (!*log)
+ {
+ mlog_set_categories(log);
+ return;
+ }
+ level = strtol(log, &ptr, 10);
if (ptr && *ptr)
{
// we can have a default level, eg, 2,foo:ERROR