2018-10-04 19:10:43 +02:00
|
|
|
<?php
|
|
|
|
|
2020-09-06 11:38:10 +02:00
|
|
|
use Monolog\Handler\NullHandler;
|
2018-10-04 19:10:43 +02:00
|
|
|
use Monolog\Handler\StreamHandler;
|
2020-09-06 11:38:10 +02:00
|
|
|
use Monolog\Handler\SyslogUdpHandler;
|
2018-10-04 19:10:43 +02: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'),
|
|
|
|
|
2022-06-21 12:00:17 +02: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.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
'deprecations' => [
|
|
|
|
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
|
|
|
'trace' => false,
|
|
|
|
],
|
|
|
|
|
2018-10-04 19:10:43 +02: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",
|
|
|
|
| "errorlog", "monolog",
|
|
|
|
| "custom", "stack"
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
'channels' => [
|
|
|
|
'stack' => [
|
2018-10-15 07:00:48 +02:00
|
|
|
'driver' => 'stack',
|
|
|
|
'channels' => ['single'],
|
2020-09-06 11:38:10 +02:00
|
|
|
'ignore_exceptions' => false,
|
2018-10-04 19:10:43 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
'single' => [
|
|
|
|
'driver' => 'single',
|
2018-10-15 07:00:48 +02:00
|
|
|
'path' => storage_path('logs/laravel.log'),
|
2022-06-21 12:00:17 +02:00
|
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
2018-10-04 19:10:43 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
'daily' => [
|
|
|
|
'driver' => 'daily',
|
2018-10-15 07:00:48 +02:00
|
|
|
'path' => storage_path('logs/laravel.log'),
|
2022-06-21 12:00:17 +02:00
|
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
2020-09-06 11:38:10 +02:00
|
|
|
'days' => 14,
|
2018-10-04 19:10:43 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
'slack' => [
|
2018-10-15 07:00:48 +02:00
|
|
|
'driver' => 'slack',
|
|
|
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
2018-10-04 19:10:43 +02:00
|
|
|
'username' => 'Laravel Log',
|
2018-10-15 07:00:48 +02:00
|
|
|
'emoji' => ':boom:',
|
2022-06-21 12:00:17 +02:00
|
|
|
'level' => env('LOG_LEVEL', 'critical'),
|
2018-10-04 19:10:43 +02:00
|
|
|
],
|
|
|
|
|
2020-09-06 11:38:10 +02:00
|
|
|
'papertrail' => [
|
|
|
|
'driver' => 'monolog',
|
2022-06-21 12:00:17 +02:00
|
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
|
|
|
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
2020-09-06 11:38:10 +02:00
|
|
|
'handler_with' => [
|
|
|
|
'host' => env('PAPERTRAIL_URL'),
|
|
|
|
'port' => env('PAPERTRAIL_PORT'),
|
2022-06-21 12:00:17 +02:00
|
|
|
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
2020-09-06 11:38:10 +02:00
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2018-10-04 19:10:43 +02:00
|
|
|
'stderr' => [
|
2018-10-15 07:00:48 +02:00
|
|
|
'driver' => 'monolog',
|
2022-06-21 12:00:17 +02:00
|
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
2018-10-04 19:10:43 +02:00
|
|
|
'handler' => StreamHandler::class,
|
2020-09-06 11:38:10 +02:00
|
|
|
'formatter' => env('LOG_STDERR_FORMATTER'),
|
2018-10-15 07:00:48 +02:00
|
|
|
'with' => [
|
2018-10-04 19:10:43 +02:00
|
|
|
'stream' => 'php://stderr',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
'syslog' => [
|
|
|
|
'driver' => 'syslog',
|
2022-06-21 12:00:17 +02:00
|
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
2018-10-04 19:10:43 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
'errorlog' => [
|
|
|
|
'driver' => 'errorlog',
|
2022-06-21 12:00:17 +02:00
|
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
2018-10-04 19:10:43 +02:00
|
|
|
],
|
2020-09-06 11:38:10 +02:00
|
|
|
|
|
|
|
'null' => [
|
|
|
|
'driver' => 'monolog',
|
|
|
|
'handler' => NullHandler::class,
|
|
|
|
],
|
|
|
|
|
|
|
|
'emergency' => [
|
|
|
|
'path' => storage_path('logs/laravel.log'),
|
|
|
|
],
|
2020-12-24 17:01:24 +01:00
|
|
|
|
|
|
|
'invoiceninja' => [
|
|
|
|
'driver' => 'single',
|
2021-07-07 10:15:56 +02:00
|
|
|
'level' => 'debug',
|
2020-12-25 12:29:42 +01:00
|
|
|
'path' => storage_path('logs/invoiceninja.log'),
|
2020-12-24 17:01:24 +01:00
|
|
|
],
|
2021-07-04 12:53:32 +02:00
|
|
|
|
|
|
|
'gelf' => [
|
|
|
|
'driver' => 'custom',
|
2022-06-21 11:57:17 +02:00
|
|
|
|
2021-07-04 12:53:32 +02:00
|
|
|
'via' => \Hedii\LaravelGelfLogger\GelfLoggerFactory::class,
|
|
|
|
|
|
|
|
// This optional option determines the processors that should be
|
|
|
|
// pushed to the handler. This option is useful to modify a field
|
|
|
|
// in the log context (see NullStringProcessor), or to add extra
|
|
|
|
// data. Each processor must be a callable or an object with an
|
|
|
|
// __invoke method: see monolog documentation about processors.
|
|
|
|
// Default is an empty array.
|
|
|
|
'processors' => [
|
|
|
|
\Hedii\LaravelGelfLogger\Processors\NullStringProcessor::class,
|
|
|
|
// another processor...
|
|
|
|
],
|
|
|
|
|
|
|
|
// This optional option determines the minimum "level" a message
|
|
|
|
// must be in order to be logged by the channel. Default is 'debug'
|
|
|
|
'level' => 'debug',
|
|
|
|
|
|
|
|
// This optional option determines the channel name sent with the
|
|
|
|
// message in the 'facility' field. Default is equal to app.env
|
|
|
|
// configuration value
|
2021-10-16 04:29:04 +02:00
|
|
|
'name' => 'v5_app',
|
2021-07-04 12:53:32 +02:00
|
|
|
|
|
|
|
// This optional option determines the system name sent with the
|
|
|
|
// message in the 'source' field. When forgotten or set to null,
|
|
|
|
// the current hostname is used.
|
|
|
|
'system_name' => null,
|
|
|
|
|
|
|
|
// This optional option determines if you want the UDP, TCP or HTTP
|
|
|
|
// transport for the gelf log messages. Default is UDP
|
|
|
|
'transport' => 'udp',
|
|
|
|
|
|
|
|
// This optional option determines the host that will receive the
|
|
|
|
// gelf log messages. Default is 127.0.0.1
|
|
|
|
'host' => env('GRAYLOG_SERVER', '127.0.0.1'),
|
|
|
|
|
|
|
|
// This optional option determines the port on which the gelf
|
|
|
|
// receiver host is listening. Default is 12201
|
|
|
|
'port' => 12201,
|
|
|
|
|
|
|
|
// This optional option determines the path used for the HTTP
|
|
|
|
// transport. When forgotten or set to null, default path '/gelf'
|
|
|
|
// is used.
|
|
|
|
'path' => null,
|
|
|
|
|
|
|
|
// This optional option determines the maximum length per message
|
2022-06-21 11:57:17 +02:00
|
|
|
// field. When forgotten or set to null, the default value of
|
2021-07-04 12:53:32 +02:00
|
|
|
// \Monolog\Formatter\GelfMessageFormatter::DEFAULT_MAX_LENGTH is
|
|
|
|
// used (currently this value is 32766)
|
|
|
|
'max_length' => null,
|
|
|
|
|
|
|
|
// This optional option determines the prefix for 'context' fields
|
|
|
|
// from the Monolog record. Default is null (no context prefix)
|
|
|
|
'context_prefix' => null,
|
|
|
|
|
|
|
|
// This optional option determines the prefix for 'extra' fields
|
|
|
|
// from the Monolog record. Default is null (no extra prefix)
|
|
|
|
'extra_prefix' => null,
|
|
|
|
],
|
2018-10-04 19:10:43 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|