2018-02-20 01:09:56 +08:00
|
|
|
<?php
|
2018-08-27 00:40:04 +08:00
|
|
|
|
2018-02-20 01:09:56 +08:00
|
|
|
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', 'stack'),
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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", "slack", "syslog",
|
|
|
|
| "errorlog", "custom", "stack"
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
'channels' => [
|
|
|
|
'stack' => [
|
2018-08-27 00:40:04 +08:00
|
|
|
'driver' => 'stack',
|
2018-03-17 09:12:56 +08:00
|
|
|
'channels' => [
|
|
|
|
'daily',
|
2018-08-27 00:40:04 +08:00
|
|
|
// PHP_SAPI === 'cli' ? 'console' : 'daily',
|
2018-03-17 09:12:56 +08:00
|
|
|
],
|
|
|
|
],
|
2018-03-18 07:05:51 +08:00
|
|
|
'cron' => [
|
2018-08-27 00:40:04 +08:00
|
|
|
'driver' => 'stack',
|
2018-03-17 09:12:56 +08:00
|
|
|
'channels' => [
|
2018-03-18 07:05:51 +08:00
|
|
|
'cron_rotating',
|
2018-03-17 09:12:56 +08:00
|
|
|
'stdout',
|
|
|
|
],
|
2018-02-20 01:09:56 +08:00
|
|
|
],
|
|
|
|
'single' => [
|
|
|
|
'driver' => 'single',
|
2018-08-27 00:40:04 +08:00
|
|
|
'path' => storage_path('logs/laravel.log'),
|
|
|
|
'level' => 'debug',
|
2018-02-20 01:09:56 +08:00
|
|
|
],
|
|
|
|
'daily' => [
|
|
|
|
'driver' => 'daily',
|
2018-08-27 00:40:04 +08:00
|
|
|
'path' => storage_path('logs/laravel.log'),
|
|
|
|
'level' => 'debug',
|
|
|
|
'days' => 3,
|
2018-02-20 01:09:56 +08:00
|
|
|
],
|
2018-03-18 07:05:51 +08:00
|
|
|
'cron_rotating' => [
|
|
|
|
'driver' => 'daily',
|
2018-08-27 00:40:04 +08:00
|
|
|
'path' => storage_path('logs/cron.log'),
|
|
|
|
'level' => 'debug',
|
|
|
|
'days' => 3,
|
2018-03-18 07:05:51 +08:00
|
|
|
],
|
2018-02-20 01:09:56 +08:00
|
|
|
'slack' => [
|
2018-08-27 00:40:04 +08:00
|
|
|
'driver' => 'slack',
|
|
|
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
2018-02-20 01:09:56 +08:00
|
|
|
'username' => 'Laravel Log',
|
2018-08-27 00:40:04 +08:00
|
|
|
'emoji' => ':boom:',
|
|
|
|
'level' => 'critical',
|
2018-02-20 01:09:56 +08:00
|
|
|
],
|
2018-03-17 09:12:56 +08:00
|
|
|
'stdout' => [
|
|
|
|
'driver' => 'custom',
|
2018-08-27 00:40:04 +08:00
|
|
|
'via' => \App\Console\Logger::class,
|
2018-03-17 09:12:56 +08:00
|
|
|
],
|
2018-02-20 01:09:56 +08:00
|
|
|
'syslog' => [
|
|
|
|
'driver' => 'syslog',
|
2018-08-27 00:40:04 +08:00
|
|
|
'level' => 'debug',
|
2018-02-20 01:09:56 +08:00
|
|
|
],
|
|
|
|
'errorlog' => [
|
|
|
|
'driver' => 'errorlog',
|
2018-08-27 00:40:04 +08:00
|
|
|
'level' => 'debug',
|
2018-02-20 01:09:56 +08:00
|
|
|
],
|
|
|
|
],
|
|
|
|
];
|