3ehrang / logger4php by 3ehrang

Add log4php in Laravel
252
2
2
Package Data
Maintainer Username: 3ehrang
Maintainer Contact: 3ehrang@gmail.com (Behrang No)
Package Create Date: 2017-04-15
Package Last Update: 2018-02-18
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-04-14 15:06:44
Package Statistics
Total Downloads: 252
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Logger4php

Apache log4php in Laravel

Laravel Log4php

Package to enable log4php

Installation

Update your composer.json file to include this package as a dependency

Laravel 5

composer require "i3ehrang/logger4php:dev-master"

Register the Logger4php service provider by adding it to the providers array.

'providers' => array(
	...
	'I3ehrang\Logger4php\Logger4phpServiceProvider'
)

Alias the Logger4php facade by adding it to the aliases array in the app/config/app.php file.

'aliases' => array(
	...
	'Logger4php' => I3ehrang\Logger4php\Facades\Logger4php::class
)

Configuration

Copy the config file from vendor into your project and change it as your own

\vendor\i3ehrang\logger4php\src\config\logger4php.php
Optional: copy \vendor\i3ehrang\logger4php\src\log4php.xml to your app\config for customize.

Usage

use Logger4php;

Logger4php::setParams(['user' => 'John', 'id' => '1'])
    ->info();

This package is wrapps Log4php Package for Laravel 5.