winter/config/logging.php
Luke Towers f6510979cc Sync config defaults with Laravel 9.x skeleton
Changed from Laravel defaults:
- Array configuration items should have their assigner operators aligned and keys should be sorted alphabetically

Removed:
- database.fetch: Removed from the default in Laravel 5.4 (and originally changed to FETCH_OBJ in 5.3) see 770c41552f & https://github.com/laravel/laravel/pull/3815
- filesystems.cloud: Removed from the default in Laravel 8.4.4 since it's not good practice to use Storage::cloud(), should use explicit disk configurations instead. See 82213fbf40
- services.mandrill: No longer officially supported since < Laravel 6.x; can use the SMTP driver instead
- services.sparkport: No longer officially supported in Laravel since < Laravel 6.x or Winter since v1.2 (third party package to reprovide driver is available but config should be manually added when desired.)
- services.stripe: Removed in Laravel v5.8.35, see 83d2ecc0e9

Explicitly not synced:
- Some calls to env(), will be addressed by future work on the ConfigWriter
- auth.php, will be addressed by future work to bring the Winter auth system more in line with the Laravel one
- cors.php, not implemented by default in Winter at the moment, plugins are available
- filesystems.php: storage.links & storage.disks.public not included because storage:link is not supported by Winter yet and further thought is needed for its inclusion.
- mail.php: markdown - Laravel's markdown mail functionality not verified to work within Winter which has it's own set of email templating logic. May be investigated and included later down the road if desired.
- sanctum.php: Laravel Sanctum is an authentication system for Laravel that is completely untested with Winter. Can be evaluated at a later date for inclusion.
2022-02-14 14:42:24 -06:00

116 lines
3.6 KiB
PHP

<?php
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' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Winter 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' => [
'channels' => ['single'],
'driver' => 'stack',
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'level' => env('LOG_LEVEL', 'debug'),
'path' => storage_path('logs/system.log'),
],
'daily' => [
'days' => 14,
'driver' => 'daily',
'level' => env('LOG_LEVEL', 'debug'),
'path' => storage_path('logs/system.log'),
],
'slack' => [
'driver' => 'slack',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Winter Log',
],
'papertrail' => [
'driver' => 'monolog',
'handler' => env('LOG_PAPERTRAIL_HANDLER', \Monolog\Handler\SyslogUdpHandler::class),
'handler_with' => [
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
'level' => env('LOG_LEVEL', 'debug'),
],
'stderr' => [
'driver' => 'monolog',
'formatter' => env('LOG_STDERR_FORMATTER'),
'handler' => \Monolog\Handler\StreamHandler::class,
'level' => env('LOG_LEVEL', 'debug'),
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
],
'null' => [
'driver' => 'monolog',
'handler' => \Monolog\Handler\NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/system.log'),
],
],
];