Re: [Zope-dev] Syslog logger broken?

2004-08-04 Thread Paul Winkler
I could really use some help with this one.
Does anybody have:

A) an /etc/syslog.conf that definitely works
for logging messages from python's syslog logger?

B) a simple python script that exercises A?

I decided to check whether something was wrong with my syslog
configuration; i now suspect there may be, because 
I have been unable to get anything into syslog via python at all.
Here is my non-working test script, derived from the example
in the python standard lib docs at
http://docs.python.org/lib/node301.html :

import logging
logger = logging.getLogger('myapp')
hdlr = logging.handlers.SysLogHandler()
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
hdlr.setFormatter(formatter)
logger.addHandler(hdlr) 
logger.setLevel(logging.WARNING)
logger.error('We have a problem')
logger.info('While this is just chatty')


And here is my attempt at logging everything to a new syslog file,
this is in /etc/syslog.conf:

# XXX
*.* -/var/log/pw_testing.log



On Tue, Aug 03, 2004 at 12:07:33AM -0400, Paul Winkler wrote:
> On Sun, Aug 01, 2004 at 06:20:19AM +0200, Andreas Jung wrote:
> > 
> > 
> > --On Samstag, 31. Juli 2004 23:37 Uhr -0400 Paul Winkler 
> > <[EMAIL PROTECTED]> wrote:
> > 
> > >Has anybody had success with the syslog logger in Zope 2.7.0 or later?
> > >AFAICT the example in zope.conf.in is borken.
> > >See http://collector.zope.org/Zope/1425
> > >
> > >Andreas assigned it to me, but I really have no clue
> > >how to fix it.
> > >
> > >
> > 
> > hm...according to your report only the entries in the example are 
> > broken...maybe I have to
> > re-read again..
> 
> Yes, please do :-)
> >From the bug report:
> 
> """
> The following is what I guess to be correct based on 
> zLOG/component.xml, and it raises no errors, but I don't see any 
> output either (maybe it's a problem with my /etc/syslog.conf):
> 
> 
>level all
>   
>  address localhost:514
>   
> 
> """
> 
> -- 
> 
> Paul Winkler
> http://www.slinkp.com
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )

-- 

Paul Winkler
http://www.slinkp.com
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Syslog logger broken?

2004-08-02 Thread Paul Winkler
On Sun, Aug 01, 2004 at 06:20:19AM +0200, Andreas Jung wrote:
> 
> 
> --On Samstag, 31. Juli 2004 23:37 Uhr -0400 Paul Winkler 
> <[EMAIL PROTECTED]> wrote:
> 
> >Has anybody had success with the syslog logger in Zope 2.7.0 or later?
> >AFAICT the example in zope.conf.in is borken.
> >See http://collector.zope.org/Zope/1425
> >
> >Andreas assigned it to me, but I really have no clue
> >how to fix it.
> >
> >
> 
> hm...according to your report only the entries in the example are 
> broken...maybe I have to
> re-read again..

Yes, please do :-)
>From the bug report:

"""
The following is what I guess to be correct based on 
zLOG/component.xml, and it raises no errors, but I don't see any 
output either (maybe it's a problem with my /etc/syslog.conf):


   level all
  
 address localhost:514
  

"""

-- 

Paul Winkler
http://www.slinkp.com
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Syslog logger broken?

2004-07-31 Thread Paul Winkler
Has anybody had success with the syslog logger in Zope 2.7.0 or later?
AFAICT the example in zope.conf.in is borken.
See http://collector.zope.org/Zope/1425 

Andreas assigned it to me, but I really have no clue
how to fix it. 

-- 

Paul Winkler
http://www.slinkp.com
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )