Skip to content

A free open source IT asset/license management system

Allow toggle for logging deprecation warnings

snipe934aa3da7fb1
diff --git a/.env.example b/.env.example
index 8aa3146902..81de24ead1 100644
--- a/.env.example
+++ b/.env.example
@@ -179,6 +179,7 @@ PASSWORD_RESET_MAX_ATTEMPTS_PER_MIN=50
# OPTIONAL: MISC
# --------------------------------------------
LOG_CHANNEL=single
+LOG_DEPRECATIONS=false
LOG_MAX_DAYS=10
APP_LOCKED=false
APP_CIPHER=AES-256-CBC
diff --git a/config/logging.php b/config/logging.php
index afaf09ed27..c5991145a3 100644
--- a/config/logging.php
+++ b/config/logging.php
@@ -140,5 +140,11 @@ if ((env('APP_ENV')=='production') && (env('ROLLBAR_TOKEN'))) {
}
+if (env('LOG_DEPRECATIONS')=='true') {
+ $config['channels']['deprecations'] = [
+ 'driver' => 'single',
+ 'path' => storage_path('logs/deprecations.log')
+ ];
+}
return $config;
\ No newline at end of file