[mod_python] Re: Logging servlets with mod_log_config

Evan Klitzke evan at yelp.com
Mon Sep 10 17:03:11 EDT 2007

On 9/10/07, Evan Klitzke <evan at yelp.com> wrote:
> Hi everyone,
> I want to start logging which servlets are called on each incoming
> request, and I'd like to do the logging from within Apache, so that
> the information will appear within the Apache logs. From the apache
> documentation (http://httpd.apache.org/docs/2.2/mod/mod_log_config.html),
> it looks like I can achieve this with something like the %{foo}n
> directive, which allows one to log a "note" from another module.
> Can someone elaborate more on this? What is a "note" in Apache
> terminology? And how could I set one from a mod_python request
> handler?

I looked at the source, and I figured it out -- I just need to add the
"note" to req.notes (where req is the request object), which is a

Evan Klitzke <evan at yelp.com>

More information about the Mod_python mailing list