Merge pull request #11562 from uberbrady/clarify_logging

Fixed inconsistent `*_LOG_LEVEL` variables; set reasonable defaults
This commit is contained in:
snipe 2022-07-25 20:02:37 -07:00 committed by GitHub
commit 7d2fcef807
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 65 deletions

View file

@ -155,8 +155,8 @@ RESET_PASSWORD_LINK_EXPIRES=900
# -------------------------------------------- # --------------------------------------------
# OPTIONAL: MISC # OPTIONAL: MISC
# -------------------------------------------- # --------------------------------------------
APP_LOG=stderr LOG_CHANNEL=stderr
APP_LOG_MAX_FILES=10 LOG_MAX_DAYS=10
APP_LOCKED=false APP_LOCKED=false
APP_CIPHER=AES-256-CBC APP_CIPHER=AES-256-CBC
GOOGLE_MAPS_API= GOOGLE_MAPS_API=

View file

@ -93,7 +93,7 @@ DISABLE_NOSAML_LOCAL_LOGIN=true
# -------------------------------------------- # --------------------------------------------
# OPTIONAL: MISC # OPTIONAL: MISC
# -------------------------------------------- # --------------------------------------------
APP_LOG=single LOG_CHANNEL=single
LOG_LEVEL=debug LOG_LEVEL=debug
LOG_CHANNEL=stack LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=null LOG_SLACK_WEBHOOK_URL=null

View file

@ -158,8 +158,8 @@ PASSWORD_RESET_MAX_ATTEMPTS_PER_MIN=50
# -------------------------------------------- # --------------------------------------------
# OPTIONAL: MISC # OPTIONAL: MISC
# -------------------------------------------- # --------------------------------------------
APP_LOG=single LOG_CHANNEL=single
APP_LOG_MAX_FILES=10 LOG_MAX_DAYS=10
APP_LOCKED=false APP_LOCKED=false
APP_CIPHER=AES-256-CBC APP_CIPHER=AES-256-CBC
APP_FORCE_TLS=false APP_FORCE_TLS=false

View file

@ -70,5 +70,5 @@ SECURE_COOKIES=false
# -------------------------------------------- # --------------------------------------------
# OPTIONAL: APP LOG FORMAT # OPTIONAL: APP LOG FORMAT
# -------------------------------------------- # --------------------------------------------
APP_LOG=single LOG_CHANNEL=single
APP_LOG_LEVEL=debug LOG_LEVEL=debug

View file

@ -34,4 +34,4 @@ IMAGE_LIB=gd
# -------------------------------------------- # --------------------------------------------
# OPTIONAL: APP LOG FORMAT # OPTIONAL: APP LOG FORMAT
# -------------------------------------------- # --------------------------------------------
APP_LOG=single LOG_CHANNEL=single

View file

@ -118,7 +118,7 @@
"description": "The duration (in seconds) that the user should be blocked from attempting to authenticate again.", "description": "The duration (in seconds) that the user should be blocked from attempting to authenticate again.",
"value": "60" "value": "60"
}, },
"APP_LOG": { "LOG_CHANNEL": {
"description": "Driver to send logs to. (errorlog for stderr)", "description": "Driver to send logs to. (errorlog for stderr)",
"value": "errorlog" "value": "errorlog"
}, },

View file

@ -129,55 +129,6 @@ return [
'cipher' => env('APP_CIPHER', 'AES-256-CBC'), 'cipher' => env('APP_CIPHER', 'AES-256-CBC'),
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings 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 Settings: "single", "daily", "syslog", "errorlog"
|
*/
'log' => env('APP_LOG', 'single'),
/*
|--------------------------------------------------------------------------
| Logging Max Files
|--------------------------------------------------------------------------
|
| When using the daily log mode, Laravel will only retain 5
| days of log files by default.
|
| To change this, set the APP_LOG_MAX_FILES option in your .env.
|
*/
'log_max_files' => env('APP_LOG_MAX_FILES', 5),
/*
|--------------------------------------------------------------------------
| Logging Detail
|--------------------------------------------------------------------------
|
| By default, Laravel writes all log levels to storage. However, in your
| production environment, you may wish to configure the minimum severity that
| should be logged by editing your APP_LOG_LEVEL env config.
|
| Laravel will log all levels greater than or equal to the specified severity.
| For example, a default log_level of error will log error, critical, alert,
| and emergency messages.
|
| APP_LOG_LEVEL options are:
| "debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"
|
*/
'log_level' => env('APP_LOG_LEVEL', 'error'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Storage path for private uploads | Default Storage path for private uploads

View file

@ -44,14 +44,14 @@ return [
'single' => [ 'single' => [
'driver' => 'single', 'driver' => 'single',
'path' => storage_path('logs/laravel.log'), 'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'), 'level' => env('LOG_LEVEL', 'warning'),
], ],
'daily' => [ 'daily' => [
'driver' => 'daily', 'driver' => 'daily',
'path' => storage_path('logs/laravel.log'), 'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'), 'level' => env('LOG_LEVEL', 'warning'),
'days' => 14, 'days' => env('LOG_MAX_DAYS', 14),
], ],
'slack' => [ 'slack' => [
@ -64,7 +64,7 @@ return [
'papertrail' => [ 'papertrail' => [
'driver' => 'monolog', 'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'), 'level' => env('LOG_LEVEL', 'warning'),
'handler' => SyslogUdpHandler::class, 'handler' => SyslogUdpHandler::class,
'handler_with' => [ 'handler_with' => [
'host' => env('PAPERTRAIL_URL'), 'host' => env('PAPERTRAIL_URL'),
@ -74,7 +74,7 @@ return [
'stderr' => [ 'stderr' => [
'driver' => 'monolog', 'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'), 'level' => env('LOG_LEVEL', 'warning'),
'handler' => StreamHandler::class, 'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'), 'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [ 'with' => [
@ -84,12 +84,12 @@ return [
'syslog' => [ 'syslog' => [
'driver' => 'syslog', 'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'), 'level' => env('LOG_LEVEL', 'warning'),
], ],
'errorlog' => [ 'errorlog' => [
'driver' => 'errorlog', 'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'), 'level' => env('LOG_LEVEL', 'warning'),
], ],
'null' => [ 'null' => [