Tofu Optimist wrote:
Specifically,
I'd like to log certain image file requests (all files
with .jpg, .gif, and .png extensions) to a custom log,

image_log, logging IP, file, time, status, bytes,
referer, cookies, etc.


I care about speed here.

Would you suggest a native logging http://www.modperlcookbook.org/chapters/ch16.pdf

or take this route
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlLogHandler

native Apache routines, written in C, will always be faster, so if you can get the same functionality from native routines use them. it's the flexibility mod_perl offers that makes it special :)



If the former, would you have any sample config code to illustrate?

I think the conditional logging recipe is pretty descriptive. see also the CustomLog directive description in the apache documentation


http://httpd.apache.org/docs-2.0/mod/directives.html

FilesMatch might also help.

--Geoff


Thanks!


-TO





--- Geoffrey Young <[EMAIL PROTECTED]> wrote:


Tofu Optimist wrote:


I would like to append a small line of log

information


to a file on certain apache2 requests.  For this
application, I am very concerned about speed, so

i'm


looking for fast simple solutions.

if speed is the concern, just stick to apache's native logging mechanism.

see recipe 16.5, "Conditional Logging" in the
mod_perl developer's cookbook:

http://www.modperlcookbook.org/chapters/ch16.pdf

in mod_perl 2.0, it's still $r->subprocess_env(),
but you need to load APR::Table first.


HTH

--Geoff



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info:
http://perl.apache.org/maillist/modperl.html




__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com



Reply via email to