josrom / laravel-logger
ChannelLog: Custom logger to laravel
Installs: 3 099
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.5
- guzzlehttp/guzzle: ~6.0
- laravel/framework: 5.*
README
Introduction
ChannelLog provides a feature to log in different files.
Installation
To get the last version of ChannelLog, simply require the project using Composer:
composer require josrom/laravel-logger
Instead, you may of course manually update your require block and run composer update if you so choose:
{ "require": { "josrom/laravel-logger": "0.1.*" } }
Add the service provider and alias to config/app.php
file:
'providers' => [ // Other Service Providers Laravel\ChannelLog\ChannelLogServiceProvider::class, ], 'aliases' => [ // Other Alias 'ChannelLog' => \Laravel\ChannelLog\ChannelLog::class, ],
After to set up the provider, copy the default config file from the package using the vendor:publish
artisan command:
php artisan vendor:publish --provider="Laravel\ChannelLog\ChannelLogServiceProvider"
Usage
Edit the config to add new logs, channels and extras:
'error' => [ 'path' => 'logs/laravel-error.log', 'level' => \Monolog\Logger::ERROR, ], 'info' => [ 'path' => 'logs/laravel-info.log', 'level' => \Monolog\Logger::INFO, 'extras' => ['internet-provider'], ],
Extras availables
- Internet provider:
internet-provider