Henning Westerholt wrote:
On Friday 13 July 2007, you wrote:
Henning Westerholt wrote:
On Friday 13 July 2007, Klaus Darilion wrote:
1) logging and message format:
There will be different macros for each log level and the message
should include the module_name and function for a better tracking of
the messages:
LOG_NOTICE("module_name:function: message")
LOG_DBG("module_name:function: message")
LOG_ERR("module_name:function: message")
is it possible to write a macro which sets "module_name" and "function"
automatically?
It's possible with gcc macros to get the file and line number i think.
Exactly that's the problem - those are macros which are not standard
across compilers. For example SUNCC does not recognize them....
I admit it will be easier to have the macros, but if it is not something
portable, I will prefer to avoid it.
At least __FILE__ and __LINE__ should be available with sun cc, as i've read
in some sun man pages. And __FUNCTION__, which could be very useful, could be
masked with an #ifdef if this is not available. So we could use this
facilities.
I think the __FUCTION__ is the rather useful one; anyhow we do not have
the module name, which is the most useful one.
maybe for module name we can export automatically a macro from
Makefile.......maybe we can try to play with something like this....
i see the most comments are about the message format. Should I
understand the the logging layers (syslog and dprint) are ok as proposed
design? ;)
regards,
bogdan
_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel