The simple way to do a startup-handler is to put something like this in
your apache config:

        PerlRequire /path/to/handler.pl

You can init log4perl in there.  That gets run when apache starts up,
and so that initialization will affect the perl interpreter thereafter.

The fancy way to do a handler is described here:

http://perl.apache.org/docs/1.0/guide/getwet.html#A_Simple_Apache_Perl_Content_Handler

One or the other may be more or less appropriate depending on the rest
of the environment you're in, for instance:

http://www.masonhq.com/docs/manual/Admin.html#writing_a_wrapper


Berg, Eric wrote:
> I'm setting up apache 1.3 to serve up an app that uses my modules that
> make extensive use of Log4perl, but I'm not sure how to initialize it.
> I've read 
> 
> http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4
> perl.html#a36c1
> Log::Log4perl - Log4j implementation for Perl
> 
> and 
> http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4
> perl/FAQ.html#792b4
> Log::Log4perl::FAQ - Frequently Asked Questions on Log::Log4perl
> 
> but have had no luck finding out exactly what a "startup handler" is.
> 
> Does anybody have any example code, including apache config, for
> initializing l4p in a mod_perl context?
> 
> Thanks
> 
> Eric D. Berg
> Lehman Brothers
>> Fixed Income Research
>> 745 7th Avenue, 15th floor
>> New York, NY 10019
>> Phone +1 212 526 8118
>>
>>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> - - - - -
> 
> This message is intended only for the personal and confidential use of the 
> designated recipient(s) named above.  If you are not the intended recipient 
> of this message you are hereby notified that any review, dissemination, 
> distribution or copying of this message is strictly prohibited.  This 
> communication is for information purposes only and should not be regarded as 
> an offer to sell or as a solicitation of an offer to buy any financial 
> product, an official confirmation of any transaction, or as an official 
> statement of Lehman Brothers.  Email transmission cannot be guaranteed to be 
> secure or error-free.  Therefore, we do not represent that this information 
> is complete or accurate and it should not be relied upon as such.  All 
> information is subject to change without notice.
> 
> --------
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within 
> this communication (including any attachments) is not intended or written to 
> be used and cannot be used for the purpose of (i) avoiding U.S. tax related 
> penalties or (ii) promoting, marketing or recommending to another party any 
> transaction or matter addressed herein.
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> log4perl-devel mailing list
> log4perl-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/log4perl-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to