Files
spa-api/config/logging.php

132 lines
4.1 KiB
PHP
Raw Normal View History

2018-01-04 15:28:26 -06:00
<?php
use Monolog\Handler\NullHandler;
2018-03-14 14:17:27 -05:00
use Monolog\Handler\StreamHandler;
2018-09-06 08:23:36 -05:00
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
2018-03-14 14:17:27 -05:00
2018-01-04 15:28:26 -06: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.
|
*/
2018-01-26 14:41:53 -06:00
'default' => env('LOG_CHANNEL', 'stack'),
2018-01-04 15:28:26 -06:00
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
2022-05-03 16:31:17 +02:00
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => false,
],
2018-01-04 15:28:26 -06: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.
|
2018-01-18 08:55:30 -06:00
| Available Drivers: "single", "daily", "slack", "syslog",
2018-03-14 14:19:07 -05:00
| "errorlog", "monolog",
| "custom", "stack"
2018-01-04 15:28:26 -06:00
|
*/
'channels' => [
2018-01-18 08:26:24 -06:00
'stack' => [
'driver' => 'stack',
2019-12-13 22:42:46 -06:00
'channels' => ['single'],
2019-01-28 08:38:36 -06:00
'ignore_exceptions' => false,
2018-01-16 11:52:42 -06:00
],
2018-01-04 15:28:26 -06:00
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
2018-01-04 15:28:26 -06:00
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
2018-09-27 09:01:45 -05:00
'days' => 14,
'replace_placeholders' => true,
2018-01-04 15:28:26 -06:00
],
2018-01-18 08:53:51 -06:00
'slack' => [
'driver' => 'slack',
2018-01-26 10:45:22 -06:00
'url' => env('LOG_SLACK_WEBHOOK_URL'),
2018-01-18 08:53:51 -06:00
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
2018-01-18 08:53:51 -06:00
],
2018-09-06 08:23:36 -05:00
'papertrail' => [
2018-12-18 22:22:09 -05:00
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
2018-09-06 08:23:36 -05:00
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
2018-09-06 08:23:36 -05:00
],
'processors' => [PsrLogMessageProcessor::class],
2018-09-06 08:23:36 -05:00
],
2018-03-14 14:17:27 -05:00
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
2018-03-14 14:17:27 -05:00
'handler' => StreamHandler::class,
2018-12-11 16:05:24 -06:00
'formatter' => env('LOG_STDERR_FORMATTER'),
2018-03-14 14:17:27 -05:00
'with' => [
'stream' => 'php://stderr',
],
'processors' => [PsrLogMessageProcessor::class],
2018-03-14 14:17:27 -05:00
],
2018-01-04 15:28:26 -06:00
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => LOG_USER,
'replace_placeholders' => true,
2018-01-04 15:28:26 -06:00
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
2018-01-04 15:28:26 -06:00
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
2018-01-04 15:28:26 -06:00
],
];