mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Move `resources/lang` folder * Shift registered middleware * Remove `fruitcake/laravel-cors` dependency * Streamline `$commands` property * Upgrade to Flysystem 3.0 * Shift core files * Convert `optional()` to nullsafe operator * Remove unnecessary `$model` property * Convert route options to fluent methods Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods. * Convert deprecated `$dates` property to `$casts` * Shift config files * Default config files In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used. * Bump Laravel dependencies * Use `<env>` tags for configuration `<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI. Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/ * Fix error provider * Match new symfony syntax * Match upstream syntax * Fix route syntax * generate composer.lock * Sync back configs * routes * composer * Fix more flare * fix cors * sync lang * Apply fixes from StyleCI (#14517) Co-authored-by: StyleCI Bot <bot@styleci.io> * bump larastan * update packages * wip * Temporarily lower phpstan level * Update phpstan.neon * wip * wip * wip * Apply fixes from StyleCI (#14592) Co-authored-by: StyleCI Bot <bot@styleci.io> * test * Update CiHelper.php * Update test.yml * Update CiHelper.php * Update CiHelper.php * Apply fixes from StyleCI (#14616) Co-authored-by: StyleCI Bot <bot@styleci.io> * test? * fix phpstan problems * dont run snmpsim on github ci * Fix whitespace * More whitespace * More whitespace ??? * I think the space broke it * fix the reset of the whitespace * hard code auth guard --------- Co-authored-by: Shift <shift@laravelshift.com> Co-authored-by: StyleCI Bot <bot@styleci.io> Co-authored-by: Tony Murray <murraytony@gmail.com>
169 lines
5.2 KiB
PHP
169 lines
5.2 KiB
PHP
<?php
|
|
|
|
/*
|
|
| !!!! DO NOT EDIT THIS FILE !!!!
|
|
|
|
|
| You can change settings by setting them in the environment or .env
|
|
| If there is something you need to change, but is not available as an environment setting,
|
|
| request an environment variable to be created upstream or send a pull request.
|
|
*/
|
|
|
|
use Monolog\Handler\NullHandler;
|
|
use Monolog\Handler\StreamHandler;
|
|
use Monolog\Handler\SyslogUdpHandler;
|
|
|
|
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'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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', 'flare'],
|
|
'ignore_exceptions' => false,
|
|
],
|
|
|
|
'console' => [
|
|
'driver' => 'stack',
|
|
'channels' => ['single', 'stdout', 'flare'],
|
|
'ignore_exceptions' => false,
|
|
],
|
|
|
|
'console_debug' => [
|
|
'driver' => 'stack',
|
|
'channels' => ['single', 'stdout_debug'],
|
|
'ignore_exceptions' => false,
|
|
],
|
|
|
|
'single' => [
|
|
'driver' => 'single',
|
|
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
|
|
'formatter' => \App\Logging\NoColorFormatter::class,
|
|
'level' => env('LOG_LEVEL', 'error'),
|
|
],
|
|
|
|
'daily' => [
|
|
'driver' => 'daily',
|
|
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
|
|
'formatter' => \App\Logging\NoColorFormatter::class,
|
|
'level' => env('LOG_LEVEL', 'error'),
|
|
'days' => 14,
|
|
],
|
|
|
|
'slack' => [
|
|
'driver' => 'slack',
|
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
|
'username' => 'Laravel Log',
|
|
'emoji' => ':boom:',
|
|
'level' => env('LOG_LEVEL', 'critical'),
|
|
],
|
|
|
|
'papertrail' => [
|
|
'driver' => 'monolog',
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
|
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
|
'handler_with' => [
|
|
'host' => env('PAPERTRAIL_URL'),
|
|
'port' => env('PAPERTRAIL_PORT'),
|
|
'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
|
|
],
|
|
],
|
|
|
|
'stderr' => [
|
|
'driver' => 'monolog',
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
|
'handler' => StreamHandler::class,
|
|
'formatter' => env('LOG_STDERR_FORMATTER', \App\Logging\CliColorFormatter::class),
|
|
'with' => [
|
|
'stream' => 'php://stderr',
|
|
],
|
|
],
|
|
|
|
'stdout_debug' => [
|
|
'driver' => 'monolog',
|
|
'handler' => StreamHandler::class,
|
|
'formatter' => \App\Logging\CliColorFormatter::class,
|
|
'with' => [
|
|
'stream' => 'php://output',
|
|
],
|
|
'level' => 'debug',
|
|
],
|
|
|
|
'stdout' => [
|
|
'driver' => 'monolog',
|
|
'handler' => StreamHandler::class,
|
|
'formatter' => \App\Logging\CliColorFormatter::class,
|
|
'with' => [
|
|
'stream' => 'php://output',
|
|
],
|
|
'level' => 'info',
|
|
],
|
|
|
|
'syslog' => [
|
|
'driver' => 'syslog',
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
|
],
|
|
|
|
'errorlog' => [
|
|
'driver' => 'errorlog',
|
|
'level' => env('LOG_LEVEL', 'debug'),
|
|
],
|
|
|
|
'null' => [
|
|
'driver' => 'monolog',
|
|
'handler' => NullHandler::class,
|
|
],
|
|
|
|
'emergency' => [
|
|
'path' => storage_path('logs/laravel.log'),
|
|
],
|
|
|
|
'flare' => [
|
|
'driver' => 'flare',
|
|
],
|
|
],
|
|
|
|
];
|