mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Fixes #4226 - adds log_max_files to app config and sample env
This commit is contained in:
parent
c01850fc73
commit
aa7091d962
|
@ -97,7 +97,8 @@ LOGIN_LOCKOUT_DURATION=60
|
|||
# --------------------------------------------
|
||||
# OPTIONAL: MISC
|
||||
# --------------------------------------------
|
||||
APP_LOG=single
|
||||
APP_LOG=daily
|
||||
APP_LOG_MAX_FILES=10
|
||||
APP_LOCKED=false
|
||||
FILESYSTEM_DISK=local
|
||||
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
|
||||
|
|
|
@ -98,8 +98,8 @@ class AppServiceProvider extends ServiceProvider
|
|||
if (config('app.debug')) {
|
||||
$log_level = 'debug';
|
||||
} else {
|
||||
if (config('log-level')) {
|
||||
$log_level = config('log-level');
|
||||
if (config('app.log_level')) {
|
||||
$log_level = config('app.log_level');
|
||||
} else {
|
||||
$log_level = 'error';
|
||||
}
|
||||
|
|
|
@ -121,8 +121,41 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'log' => env('APP_LOG', 'single'),
|
||||
'log-level' => env('APP_LOG_LEVEL', 'error'),
|
||||
'log' => env('APP_LOG', 'daily'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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'),
|
||||
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue