1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-17 00:22:51 +01:00
invoiceninja/config/logging.php

110 lines
3.0 KiB
PHP
Raw Normal View History

2018-10-04 19:10:43 +02:00
<?php
use Monolog\Handler\NullHandler;
2018-10-04 19:10:43 +02:00
use Monolog\Handler\StreamHandler;
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'),
/*
|--------------------------------------------------------------------------
| 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' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
2018-10-04 19:10:43 +02:00
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
2018-10-04 19:10:43 +02:00
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 14,
2018-10-04 19:10:43 +02:00
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
2018-10-04 19:10:43 +02:00
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
2018-10-04 19:10:43 +02:00
],
'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
2018-10-04 19:10:43 +02:00
'stderr' => [
'driver' => 'monolog',
2018-10-04 19:10:43 +02:00
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
2018-10-04 19:10:43 +02:00
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
2018-10-04 19:10:43 +02:00
],
'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
2018-10-04 19:10:43 +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',
2020-12-25 12:29:42 +01:00
'path' => storage_path('logs/invoiceninja.log'),
2020-12-24 17:01:24 +01:00
],
2018-10-04 19:10:43 +02:00
],
];