[email protected]
[Top] [All Lists]

Set Logging Options at Runtime

Subject: Set Logging Options at Runtime
From: Andrew Wegner
Date: Wed, 6 Jan 2010 14:33:22 -0600
According to http://incubator.apache.org/log4php/docs/configuration.html : "The Log4PHP environment is fully configurable programmatically."

I have a PHP application containing multiple modules and various settings within each module. I'd like to enable logging using log4php, but each individual module has different settings (ie. Log level, log file, etc). Some of these settings need to be changed on the fly by end users (log level), and I'd like to store these properties in the database.

Right now I can set loglevel dynamically. I can not determine how to set other properties dynamically though. Documentation on the configuration of log4php is almost exclusively done via properties/xml files - though it says all settings can be changed programmatically.

Has any done something like this? If so, how do I do so? I've looked through the documentation at http://incubator.apache.org/log4php/index.html, but I need more assistance.

To clarify - I do NOT want to use configuration files, as the end users will not have direct access to these. I will provide a front end to change certain logging settings, and all settings will be stored in the database.

Where can I find documentation on how to set various aspects of the logging within the program?

Thank you,

Andrew Wegner


<Prev in Thread] Current Thread [Next in Thread>