Logging for frameworkd

Guillaume Chereau charlie at openmoko.org
Thu Jul 24 06:37:28 CEST 2008


Ah yes : I also gave the 'DEBUG' level to many ogsmd messages (because
they are too numerous). To enable it, in the config file set :

 [ogsmd]
 log_level = DEBUG

- charlie

On Thu, 2008-07-24 at 12:29 +0800, Guillaume Chereau wrote:
> OK frameworkd code is now using a proper logging system using python
> logging [0]
> 
> I defined the default root logger (INFO level) in config.py :
> 
> logging.basicConfig(
>     level=logging.INFO,
>     format='%(name)-8s %(levelname)-8s %(message)s'
> )
> 
> Then every module can redefine its logging level in the frameword.conf
> file with the attribute 'log_level'. the possible values are :
> - CRITICAL
> - ERROR
> - WARNING
> - INFO
> - DEBUG
> - NOTSET
> 
> I redefine the LOG method to use logging, but LOG will always send
> messages to the root logger, so we should try to replace LOG calls by
> proper logging calls.
> 
> then I modified the code of many modules so that they use logging
> instead of LOG. I also removed most of the print, giving the messages
> INFO priority.
> 
> Mickey : sorry, I had to disable the color of ogsm output, I don't know
> how to do it with logging.
> 
> cheers,
> -charlie
>  
> [0] : http://docs.python.org/lib/module-logging.html
> 
> On Wed, 2008-07-23 at 12:10 +0200, Jan Lübbe wrote:
> > On Wed, 2008-07-23 at 16:35 +0800, Guillaume Chereau wrote:
> > > Then all the logging levels could be set in frameworkd file, or maybe in
> > > the config file.
> > 
> > If you read them from the config file they can also be overridden via
> > the -o command line option.
> > 
> > > If you guys are ok with that, I can try and make the modifications to
> > > the code.
> > 
> > Sounds good. :)
> > 
> _______________________________________________
> smartphones-standards mailing list
> smartphones-standards at linuxtogo.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-standards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxtogo.org/pipermail/smartphones-standards/attachments/20080724/8e5ed2e7/attachment.pgp>


More information about the smartphones-standards mailing list