[PEAK] peak.running.logs in .ini files

Phillip J. Eby pje at telecommunity.com
Tue Aug 3 09:44:03 EDT 2004

At 11:05 AM 8/3/04 +0200, Radek Kanovsky wrote:
>I have very simple application that raises unexpected exception:
>     from peak.api import *
>     class Log (binding.Component) :
>         logger = binding.Obtain(PropertyName("peak.logs.test"))

Please don't use 'peak.logs' PropertyNames to look up loggers; this may not 
work correctly in future versions of PEAK.  Instead, use a 'logger:logname' 
URL, e.g.:

     logger = binding.Obtain("logger:test")

>It relates to 'logs' appearance in .ini files and probably to its laziness.
>There are at least two solutions how to bypass this error:
>1. Reload lazy peak.running module before accessing lazy logs
>    from any .ini file (by uncommenting dir(running) in example)
>2. Redefine peak.logs.* property in .ini file, so definition doesn't rely
>    on lazy logs.
>    [peak.logs]
>    * = importString("peak.running.logs.LogStream")(
>                     stream=sys.stderr, levelName='WARNING'
>        )

I'll take a look at this and see what I can find out.

More information about the PEAK mailing list