mlog: fix setting no logs

This commit is contained in:
moneromooo-monero 2018-04-25 20:40:27 +01:00 committed by wowario
parent 4ee7781c46
commit 3741fefd9c
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111
1 changed files with 6 additions and 1 deletions

View File

@ -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