in reply to Re: modperl1.99 custom logging
in thread modperl1.99 custom logging

Near as I can tell, Apache::Log is only useful for writing to the standard Apache error log, not an arbitrary other file like Apache::LogFile. There must be a way to do this in modperl2, no?

Replies are listed 'Best First'.
Re^3: modperl1.99 custom logging
by Your Mother (Archbishop) on Jul 22, 2004 at 08:42 UTC

    This might not address the original question but something I'm playing with is setting the log variables within a mod_perl handler and then using them from the .httpd.conf. Lots more goodies where this came from at perl.apache.org. Search 2.0 docs for "log."

    # in an mp handler $r->notes('SESSION', $some_id_value); # and then in the httpd.conf LogFormat "%h %{SESSION}n %l %u %t \"%r\" %>s %b ...et cetera

    Update: mp conf to httpd.conf.

      This looks very promising.. I will try it out, thanks.
Re^3: modperl1.99 custom logging
by PodMaster (Abbot) on Jul 22, 2004 at 11:12 UTC
    There must be a way to do this in modperl2, no?
    Sure. Simply open a file and write to it. You can use open or Log::Log4perl or anything.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      The point is to use Apache logging because it is good at making sure stuff is written atomically.