Although evas_debug is flagged with "debug" in the name, messages are critical.

The evas_debug functions are just called from MAGIC_DEBUG errors, that
are quite critical, so messages should come out by default, and do
that loud with a CRITICAL warning.

Raster, cedric and others: now that we have Eina as a common
dependency between Evas and Ecore, maybe it is worth to unify the
debug system on top of Eina logging? It already provides "abort on
critical", runtime configurable log levels. I'd say the same about the
magic and safety checks themselves (eina_magic and eina_safety).




SVN revision: 49643
This commit is contained in:
Gustavo Sverzut Barbieri 2010-06-11 18:35:40 +00:00
parent 0cd94dd382
commit 94ee30952b
1 changed files with 9 additions and 10 deletions

View File

@ -106,7 +106,7 @@ evas_debug_error(void)
_evas_debug_init = 1;
}
if (_evas_debug_show)
DBG("*** EVAS ERROR: Evas Magic Check Failed!!!");
CRIT("Evas Magic Check Failed!!!");
}
void
@ -119,7 +119,7 @@ evas_debug_input_null(void)
_evas_debug_init = 1;
}
if (_evas_debug_show)
DBG("Input object pointer is NULL!");
CRIT("Input object pointer is NULL!");
if (_evas_debug_abort) abort();
}
@ -133,7 +133,7 @@ evas_debug_magic_null(void)
_evas_debug_init = 1;
}
if (_evas_debug_show)
DBG("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!");
CRIT("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!");
if (_evas_debug_abort) abort();
}
@ -147,11 +147,11 @@ evas_debug_magic_wrong(DATA32 expected, DATA32 supplied)
_evas_debug_init = 1;
}
if (_evas_debug_show)
DBG(" Input object is wrong type\n"
" Expected: %08x - %s\n"
" Supplied: %08x - %s",
expected, evas_debug_magic_string_get(expected),
supplied, evas_debug_magic_string_get(supplied));
CRIT("Input object is wrong type\n"
" Expected: %08x - %s\n"
" Supplied: %08x - %s",
expected, evas_debug_magic_string_get(expected),
supplied, evas_debug_magic_string_get(supplied));
if (_evas_debug_abort) abort();
}
@ -165,8 +165,7 @@ evas_debug_generic(const char *str)
_evas_debug_init = 1;
}
if (_evas_debug_show)
DBG("*** EVAS ERROR:\n"
"%s", (char *)str);
CRIT("%s", str);
if (_evas_debug_abort) abort();
}