[Devel] standardized log messsage formats

vallimamod abdullah vabdulla at gmail.com
Tue May 1 09:53:43 CEST 2007


On 5/1/07, Juha Heinanen <jh at tutpro.com> wrote:
> looks like each module has invented its own format (or even uses many
> different formats) for error and debug messages.  this includes modules
> that i have written myself.
>
> imo we should standardize the formats.  i don't have any strong opinion
> how they should look like, but below is a suggestion:

I fully agree with this as I have experienced big pain to filter some
specific messages.

I would suggest to use a flexible log framework like log4c
(http://log4c.sourceforge.net) based on the infamous Apache's log4j.
It allows to configure what log we want to see and where (console,
file, syslog...)

example use case: activate debugs logs from a specific module only and redirect
it to stdout; send all remaing log to file.

I am not sure if it is possible to do this at runtime but if not, it
shouldn't very hard to make it re-read its config file periodically..

-- 
Regards,
-vma
.



More information about the Devel mailing list