On Sat, 15 Aug 2009, Gustavo Sverzut Barbieri wrote:

On Sat, Aug 15, 2009 at 5:55 PM, Andre Dieb<andre.mart...@ee.ufcg.edu.br> wrote:
Changes:

Module name is now eina_log (but I didn't delete eina_error yet, as we
should delete it only when the transition is completed)
Docs on header and basic doc on .c file, but there's a lot of room for doc
improvement
Save name on domains
Clean realloc code
Keep parsing EINA_LOG_LEVELS even when user types wrong (e.g.
domain1:level1,domain2:,domain3,domain:5)
Migrate old global logger code to global logger (i.e. remove old deprecated
functions)

arghhhhhh... HTML MAIL!

now to the points
 - _DOM is not a suffix, rather a prefix namespace... like
EINA_LOG_ERR and EINA_LOG_DOM_ERR...
 - I remember Sun compiler barfing at ##__VA_ARGS__, maybe we need to
avoid that? Vincent?? (avoid that is define just as (...) and user is
obligated to give at least one parameter, fmt. That makes things
uglier IMHO)

I'll look at that next week, I think. I've already installed opensolaris in virtualbox. I just need to be at home to update my repo.

Vincent

 - _Eina_Log_Level define a value < 0 (EINA_LOG_LEVEL_MIN =
INT32_MIN) so compilers don't optimize that enum as an unsigned
integer, causing problems for users trying to specify something like
-1 for "more critical"
 - +typedef int Eina_Log; "too much", I'd use it as integer, no need
to typedef.
 - keep these as "eina_error", you're fixing error->log, but having
error codes as log codes is too much, like broking and not fixing =)
This holds true for eina_log_msg_register and friends...
+/**
+ * @var EINA_LOG_OUT_OF_MEMORY
+ * Log identifier corresponding to a lack of memory.
+ */
+EAPI extern Eina_Log EINA_LOG_MSG_OUT_OF_MEMORY;
 - colors should be improved, for example (even the old code is not good)
+static const char *_colors[EINA_LOG_LEVELS] = {
+  EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_CRITICAL
+  EINA_COLOR_RED, // EINA_LOG_LEVEL_ERR
+  EINA_COLOR_YELLOW, // EINA_LOG_LEVEL_WARN
+  EINA_COLOR_NOTHING, // EINA_LOG_LEVEL_INFO
+  EINA_COLOR_GREEN, // EINA_LOG_LEVEL_DBG
+};
for me, the more "red", more dangerous... more "green" better... So I
usually use as rule in my debugs:
  - light (\033[1m) red = critical
  - regular (dark) red = error
  - yellow = warning
  - green = info
  - light blue = debug
  - regular blue = more than debug

things I told you in previous mails:

- trailing whitespaces!!!
- have you tested the parse of broken EINA_LOG_LEVELS? Note this
+       level = strtol((char *)(end + 1), &tmp, 10);
+       if (tmp == (end + 1)) continue;
you do not change start, what happens? infinite loops... you need to
have start = next pair, so need to search for "," and update start to
that.... or add an "end" label right after appending to pending list
and "goto end" instead of continue.
 - eina_log_shutdown() should ignore already deleted entries.
 - eina_log_domain_register() should not free domains, they should be
freed in eina_log_domain_unregister()


--
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
Message délivré par le serveur de messagerie de l'Université d'Evry.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to