From f7e14520acfb35aa8bb7a21bf01721e3dc86f42a Mon Sep 17 00:00:00 2001 From: barbieri Date: Fri, 11 Jun 2010 18:35:40 +0000 Subject: [PATCH] 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). git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@49643 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/main.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/lib/main.c b/src/lib/main.c index a7e9f29..f2f369b 100644 --- a/src/lib/main.c +++ b/src/lib/main.c @@ -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(); } -- 2.7.4