ソースを参照

add a deprecation file handler to monolog

Olivier Massot 1 年間 前
コミット
cc2d764d79
1 ファイル変更8 行追加2 行削除
  1. 8 2
      config/packages/monolog.yaml

+ 8 - 2
config/packages/monolog.yaml

@@ -36,6 +36,12 @@ monolog:
             level: debug
             max_files: 3
             channels: [security]
+        file_depreciation:
+            type: rotating_file
+            path: "%kernel.logs_dir%/%kernel.environment%.deprecation.log"
+            level: debug
+            max_files: 3
+            channels: [deprecation]
 
         # email en cas d'erreurs critiques, sauf erreurs 404 / 405
         #        critical:
@@ -119,7 +125,7 @@ monolog:
             type:           fingers_crossed
             action_level:   info
             handler:        admin_info_deduplicated
-            channels: ['admin', '!deprecation']
+            channels: ['admin']
         admin_info_deduplicated:
             type: deduplication
             # the time in seconds during which duplicate entries are discarded (default: 60)
@@ -138,7 +144,7 @@ monolog:
             type:           fingers_crossed
             action_level:   critical
             handler:        admin_critical_deduplicated
-            channels: ['admin', '!deprecation']
+            channels: ['admin']
         admin_critical_deduplicated:
             type: deduplication
             # the time in seconds during which duplicate entries are discarded (default: 60)