Skip to content

Commit

Permalink
update log configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 4, 2018
1 parent 828967a commit acabdff
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

LOG_CHANNEL=single

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
Expand Down
17 changes: 0 additions & 17 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,6 @@

'cipher' => 'AES-256-CBC',

/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Settings: "single", "daily", "syslog", "errorlog"
|
*/

'log' => env('APP_LOG', 'single'),

'log_level' => env('APP_LOG_LEVEL', 'debug'),

/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
Expand Down
57 changes: 57 additions & 0 deletions config/logging.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/

'default' => env('LOG_CHANNEL', 'single'),

/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "syslog",
| "errorlog", "custom"
|
*/

'channels' => [
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
],

'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 7,
],

'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
],

'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
],
],

];

0 comments on commit acabdff

Please sign in to comment.