quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nic Ferrier <nferr...@tapsellferrier.co.uk>
Subject Re: glue between apache and python logging
Date Wed, 19 Oct 2005 17:19:00 GMT
Is everyone here called Nic[h]olas?


Nicolas Lehuen <nicolas.lehuen@gmail.com> writes:

> Nic, there is something I need to understand before giving my advice on the
> subject. I'm not familiar with the logging API, can you tell me how you
> configure Python to use this logging implementation ? Looks like we have to
> manipulate configuration object, set up handlers and so on... If so I guess
> we'd have to add a word or two in the documentation on the best way to do
> this in the mod_python context...

Hmmm... logging is actually very simple if you want it to be.

All you really have to do to use logging from Python is this:

  import logging

  # then sometime later

  logger = logging.getLogger()
  logger.debug("a log message")


lot's more things are possible and the logging API is very
configurable.


Mime
View raw message