Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josevte/laravel-logger
Custom logger to laravel
https://github.com/josevte/laravel-logger
Last synced: about 1 month ago
JSON representation
Custom logger to laravel
- Host: GitHub
- URL: https://github.com/josevte/laravel-logger
- Owner: JoseVte
- Created: 2017-07-20T11:35:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-09T13:26:29.000Z (almost 7 years ago)
- Last Synced: 2024-11-24T11:41:42.552Z (about 2 months ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Laravel 5.x ChannelLog
### Introduction
ChannelLog provides a feature to log in different files.
### Installation
To get the last version of ChannelLog, simply require the project using [Composer](https://getcomposer.org/):
```bash
composer require josrom/laravel-logger
```Instead, you may of course manually update your require block and run composer update if you so choose:
```json
{
"require": {
"josrom/laravel-logger": "0.1.*"
}
}
```Add the service provider and alias to `config/app.php` file:
```php
'providers' => [
// Other Service ProvidersLaravel\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:
```bash
php artisan vendor:publish --provider="Laravel\ChannelLog\ChannelLogServiceProvider"
```### Usage
Edit the config to add new logs, channels and extras:
```php
'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`