Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: different Log4perl configuration files in different web-apps under mod_perl

by danb (Friar)
on Jun 27, 2011 at 16:04 UTC ( [id://911573]=note: print w/replies, xml ) Need Help??


in reply to different Log4perl configuration files in different web-apps under mod_perl

1. What are the best practices for Log4perl configurations with different applications under mod_perl at the same time? Even applications from different vendors.

Use a single configuration file.

2. Is there any way to not init Log4perl on a per process basis,

Of course. Either use a mod_perl startup handler to run init(), or use Log4perl's init_once().

, for example use it as an object instance which gets shared across different requests?
Yes, but that wont give you separate configurations for each logger, all it does is saves the (very minimal) overhead of a get_logger() call.
Any other ideas on how to solve my problem besides using one configuration file for all applications?
Using a single configuration file is the only way that I know of.
  • Comment on Re: different Log4perl configuration files in different web-apps under mod_perl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://911573]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2024-04-16 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found