radical-cybertools / radical.owms

Tiered Resource OverlaY
Other
0 stars 1 forks source link

logger level from config #6

Closed marksantcroos closed 10 years ago

marksantcroos commented 10 years ago

Hi Andre,

Does the logger from RU allows the level to be set from a method? (I couldnt find it in the code)

It would be nice if we could set the loglevel based on a value in the troy.cfg.

Thanks

Gr,

Mark

andre-merzky commented 10 years ago

I think this is part of the standard Python logger syntax:

(ve)merzky@thinkie:~/saga/radical.utils (devel %=) $ python
Python 2.7.3 (default, Apr 10 2013, 05:13:16) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import radical.utils.logger as rul
>>> l = rul.getLogger ('test')
>>> l.info ('test')
>>> l.setLevel ('INFO')
>>> l.info ('test')
2013:12:02 23:19:03 MainThread   test.logger           : [INFO    ] test
>>> 
'''
marksantcroos commented 10 years ago

Let us actually implement it before closing :)

andre-merzky commented 10 years ago

Oh, details... ;)

andre-merzky commented 10 years ago

This is now implemented.