SysLogHandler is drivin me nuts
roderik
rune.hansen at scanmine.com
Thu Nov 25 08:39:44 EST 2004
michael wrote:
> Hi there,
>
> I am stuck while trying to use the logging facilities. Its not logging
> :-) Can somebody point me to a solution ?
>
> The following snipplets are used
>
> -------------------------------------------
> "crap.py"
>
> logging.config.fileConfig("logging.cfg")
> logger = logging.getLogger ("syslog")
> logger.info('While this is just chatty')
>
> -------------------------------------------
> "logging.cfg"
>
> [syslog]
> class=handlers.SysLogHandler
> level=ERROR
> formatters=form01
> facility=LOG_LOCAL0
> priority = LOG_INFO
>
> [formatters]
> keys=form01
>
> [formatter_form01]
> format=%(levelname)s %(message)s
>
> -------------------------------------------
> "/etc/syslog.conf"
>
> local0.*;local0.!=debug /var/log/local.log
> local0.=debug /var/log/local-d.log
>
> Kind regards
>
> Michael
I'm taking a wild guess here(io. I haven't tested your code), but I
don't think you can expect a logger of level ERROR to logg messages of
level INFO. Try setting your log level to INFO.
regards
/rune
More information about the Python-list
mailing list