blessing-skin-server/config/logging.php

105 lines
2.8 KiB
PHP
Raw Normal View History

2018-07-14 14:48:20 +08:00
<?php
2020-02-26 15:09:06 +08:00
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
2018-07-14 14:48:20 +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.
|
*/
2020-02-27 15:31:29 +08:00
'default' => env('LOG_CHANNEL', 'daily'),
2018-07-14 14:48:20 +08:00
/*
|--------------------------------------------------------------------------
| 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",
2020-02-26 15:09:06 +08:00
| "errorlog", "monolog",
| "custom", "stack"
2018-07-14 14:48:20 +08:00
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
2020-02-26 15:09:06 +08:00
'channels' => ['single'],
2019-09-07 13:01:44 +08:00
'ignore_exceptions' => false,
2018-07-14 14:48:20 +08:00
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
2020-02-26 15:09:06 +08:00
'days' => 14,
2018-07-14 14:48:20 +08:00
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
],
2020-02-26 15:09:06 +08:00
'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
2018-07-14 14:48:20 +08:00
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
],
'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
],
2019-07-26 15:58:13 +08:00
2020-02-26 15:09:06 +08:00
'null' => [
2019-07-26 15:58:13 +08:00
'driver' => 'monolog',
2020-02-26 15:09:06 +08:00
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
2019-07-26 15:58:13 +08:00
],
2018-07-14 14:48:20 +08:00
],
];