PHPackages                             praxigento/mage\_ext\_log4php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. praxigento/mage\_ext\_log4php

ActiveMagento-module[Logging &amp; Monitoring](/categories/logging)

praxigento/mage\_ext\_log4php
=============================

Log4php wrapper to use Log4php with Magento

0.6.0(10y ago)4326MITPHP

Since Jan 30Pushed 10y ago13 watchersCompare

[ Source](https://github.com/praxigento/mage_ext_log4php)[ Packagist](https://packagist.org/packages/praxigento/mage_ext_log4php)[ Docs](https://github.com/praxigento/mage_ext_log4php)[ RSS](/packages/praxigento-mage-ext-log4php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (7)Used By (0)

Log4php wrapper to use Log4php with Magento
===========================================

[](#log4php-wrapper-to-use-log4php-with-magento)

Installation
------------

[](#installation)

```
{
  "require": {
    "praxigento/mage_ext_log4php": "*"
  },
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/praxigento/mage_ext_log4php"
    }
  ]
}

```

Configuration
-------------

[](#configuration)

Go to System / Configuration / Developer / Log Settings and setup path to [Log4php](https://logging.apache.org/log4php/quickstart.html) configuration file relative to the Magento root folder:

[![Magento Configuration](./docs/img/config.png "Magento Configuration")](./docs/img/config.png)

Usage
-----

[](#usage)

### Simple usage

[](#simple-usage)

Usage in case of your own module has dependency to Praxigento\_Log:

```
$log       = Praxigento_Log_Logger::getLogger(__CLASS__);
$log->trace("trace level message");
$log->debug("debug level message");
$log->info("info level message");
$log->warn("warn level message");
$log->error("error level message");
$log->fatal("fatal level message");

```

### Create adapter in your own module

[](#create-adapter-in-your-own-module)

Use adapter to automatically switch between Praxigento\_Log wrapper (if installed) and Magento default logs (otherwise):

```
