eina_log: make a log level of 0 disable the log domain

this has always been specified in the docs as the means by which a log domain
is disabled

@fix
This commit is contained in:
Mike Blumenkrantz 2017-06-23 17:43:58 -04:00
parent 34ce5d648f
commit 7b4e9f5d77
1 changed files with 2 additions and 2 deletions

View File

@ -1427,7 +1427,7 @@ eina_log_print_unlocked(int domain,
#ifdef EINA_SAFETY_CHECKS
if (EINA_UNLIKELY(d->deleted))
{
if (level > d->level)
if ((!d->level) || (level > d->level))
fprintf(stderr, "ERR<%u>:eina_log %s:%d %s() log domain %d was deleted\n",
eina_log_pid_get(), file, line, fnc, domain);
else
@ -1448,7 +1448,7 @@ eina_log_print_unlocked(int domain,
#endif
if (level > d->level)
if ((!d->level) || (level > d->level))
return;
_print_cb(d, level, file, fnc, line, fmt, _print_cb_data, args);