Apache log4php integration


ls-logo.jpg

NOTE: If you'd like to log via Redis, check out my custom version of log4php on Github.

Overview

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.

Feature highlights:

  • Configuration through XML, properties or PHP files
  • Various logging destinations, including:
    • Console (stdout, stderr)
    • Files (including daily and rolling files)
    • Email
    • Databases
    • Sockets
    • Syslog
  • Several built-in log message formats, including:
    • HTML
    • XML
    • User defined pattern

Features

This module provides simple integration with the Apache log4php library.

Requirements

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.

Installation

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).

Recommended modules


Apache log4php integration项目的Drush安装命令:复制到剪贴板

注:个别模块仍需开启相关子模块。
周安装量: 
19
维护状态: 
积极维护中
开发状态: 
积极开发中

推荐版本下载:

版本下载地址发布日期发布说明翻译下载
7.x-1.1tar.gz (10.43 KB) | zip (13.39 KB)2012年10月17日发布说明简 | 繁 | 更多

开发版本下载:

版本下载地址发布日期发布说明翻译下载
7.x-1.x-devtar.gz (10.54 KB) | zip (13.5 KB)2013年10月1日发布说明简 | 繁 | 更多