Apache log4php integration
NOTE: If you'd like to log via Redis, check out my custom version of log4php on Github.
This module is designed to centralize the logging functionality of Drupal into a single module replacement for watchdog, reducing the overall burden of maintaining Drupal modules simply to support multiple watchdog backends. Apache log4php is a common-purpose library that allows messages to be logged to a wide variety of backends and provides much more granular control than Drupal's built-in capabilities.
Apache log4php™ is a versatile logging framework for PHP.
- Configuration through XML, properties or PHP files
- Various logging destinations, including:
- Console (stdout, stderr)
- Files (including daily and rolling files)
- Several built-in log message formats, including:
- User defined pattern
This module provides simple integration with the Apache log4php library.
This module requires the log4php library. This can be installed in one of two ways -
- The preferred installation method is via PEAR -
pear channel-discover pear.apache.org/log4php pear install log4php/Apache_log4php
- Alternatively the main code files can be installed via the Libraries module. Move the src/main/php directory to sites/all/libraries/log4php.
After creating an XML configuration file, include it in your settings.php file -
$conf['log4php_config'] = 'sites/all/modules/log4php/log4php.xml';
The default log4php.xml file is a basic configuration to test functionality. This configuration only writes log entries to a file located in the temp directory (will only work on Linux/Unix/Mac for now).
- Libraries (1.x only, for now)
|7.x-1.1||tar.gz (10.43 KB) | zip (13.39 KB)||2012年10月17日||发布说明||简 | 繁 | 更多|
|7.x-1.x-dev||tar.gz (10.54 KB) | zip (13.5 KB)||2013年10月1日||发布说明||简 | 繁 | 更多|