[Zope] Getting Zope code to output to event.log

Ken Winter ken at sunward.org
Mon Aug 10 12:56:25 EDT 2009


Andrew & Chris ~

Thanks, but it still doesn't work for me.  See details of what happened when
I tried each of your suggestions below.

~ Ken

> -----Original Message-----
> From: Andrew Milton [mailto:akm at theinternet.com.au]
> Sent: Wednesday, August 05, 2009 6:47 PM
> To: Ken Winter
> Cc: 'Andrew Milton'; 'Zope List'
> Subject: Re: [Zope] Getting Zope code to output to event.log
> 
> +-------[ Ken Winter ]----------------------
> |
> | > -----Original Message-----
> | > From: Andrew Milton [mailto:akm at theinternet.com.au]
> | > Sent: Wednesday, August 05, 2009 3:49 PM
> | > To: Ken Winter
> | > Cc: 'Zope List'
> | > Subject: Re: [Zope] Getting Zope code to output to event.log
> | >
> | > +-------[ Ken Winter ]----------------------
> | > |
> | > | I figure these modules have to be reinstalled or re-somethinged to
> get
> | > my
> | > | changes activated, but I don?t know how to do this.  Can you help?
> | >
> | > [this assumes the code is actually being called]
> | >
> | > You are probably logging at a level below the level that will be
> output
> | > into the log.
> | >
> | > LOG.info() is about the lowest level that will go out by default.
> | >
> | > Without seeing any examples from you it's hard to tell.
> |
> | Here's an example of the traceback from the error I'm trying to debug.
> I
> | assume the fact that a module appears in the traceback proves that it is
> | being called.
> 
> And you have your logging level set to what?
> 
> Look in your zope.conf for <eventlog> it should be similar to;
> 
> <eventlog>
>   level INFO
>   <logfile>
>     path $INSTANCE/log/event.log
>   </logfile>
> </eventlog>

My event.log setting is...

<eventlog>
  level all
  <logfile>
    path 
       /home/dhat/webapps/instance3/Zope-2.9.8-final.instance/log/event.log
    level info
  </logfile>
</eventlog>

...which seems even more permissive than your example.  

However, I also noticed this...

<logger access>
  level warn
  <logfile>
    path /home/dhat/logs/user/Z2_zope_instance3.log
    format %(message)s
  </logfile>
</logger>

...which may mean that the logger tool is not being called for levels less
than WARN.  

So I changed that line to "level info", and restarted Zope.  

No change.

> 
> You can also try changing logger.info to logger.warn or logger.error
>

Next, I tried logger.warn, and restarted Zope.  

No change.

Then I tried Chris Withers' suggestion:

"Try changing logger = logging.getLogger('OFS/Traversable.py:') to:

logger = logging.getLogger('event.OFS/Traversable.py:')"

No change.





More information about the Zope mailing list