mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Laravel 9.x Shift (#14504)
* 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>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
/*
|
||||
| !!!! DO NOT EDIT THIS FILE !!!!
|
||||
|
|
||||
| You can change settings by setting them in the environment or .env
|
||||
@@ -8,144 +8,161 @@
|
||||
| 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;
|
||||
use Monolog\Handler\NullHandler;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
|
||||
return [
|
||||
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 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'),
|
||||
'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"
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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.
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'flare'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
'deprecations' => [
|
||||
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'trace' => false,
|
||||
],
|
||||
|
||||
'console' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'stdout', 'flare'],
|
||||
'ignore_exceptions' => 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"
|
||||
|
|
||||
*/
|
||||
|
||||
'console_debug' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'stdout_debug'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'flare'],
|
||||
'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'),
|
||||
],
|
||||
'console' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'stdout', 'flare'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'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,
|
||||
],
|
||||
'console_debug' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single', 'stdout_debug'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
],
|
||||
'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'),
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
],
|
||||
],
|
||||
'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,
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
'level' => 'debug',
|
||||
],
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
],
|
||||
|
||||
'stdout_debug' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://output',
|
||||
],
|
||||
'level' => 'debug',
|
||||
],
|
||||
'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'),
|
||||
],
|
||||
],
|
||||
|
||||
'stdout' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://output',
|
||||
],
|
||||
'level' => 'info',
|
||||
],
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => env('LOG_STDERR_FORMATTER', \App\Logging\CliColorFormatter::class),
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
'stdout_debug' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://output',
|
||||
],
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
'stdout' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => \App\Logging\CliColorFormatter::class,
|
||||
'with' => [
|
||||
'stream' => 'php://output',
|
||||
],
|
||||
'level' => 'info',
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
],
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
'flare' => [
|
||||
'driver' => 'flare',
|
||||
],
|
||||
],
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
|
||||
];
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
],
|
||||
|
||||
'flare' => [
|
||||
'driver' => 'flare',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
Reference in New Issue
Block a user