Add log4php in Laravel
Apache log4php in Laravel, (*1)
Package to enable log4php, (*2)
composer.json file to include this package as a dependency, (*3)
Laravel 5, (*4)
composer require "i3ehrang/logger4php:dev-master"
Register the Logger4php service provider by adding it to the providers array., (*5)
'providers' => array( ... 'I3ehrang\Logger4php\Logger4phpServiceProvider' )
Alias the Logger4php facade by adding it to the aliases array in the
app/config/app.php file., (*6)
'aliases' => array( ... 'Logger4php' => I3ehrang\Logger4php\Facades\Logger4php::class )
Copy the config file from vendor into your project and change it as your own, (*7)
\vendor\i3ehrang\logger4php\src\log4php.xmlto your app\config for customize.
use Logger4php; Logger4php::setParams(['user' => 'John', 'id' => '1']) ->info();
This package is wrapps Log4php Package for Laravel 5., (*8)