monolog.yaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. monolog:
  2. channels:
  3. - deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
  4. - cron
  5. handlers:
  6. # sorties standards (stdout, stderr, console)
  7. stderr:
  8. type: stream
  9. path: php://stderr
  10. level: error
  11. channels: [ "!event", "!doctrine", "!cron" ]
  12. console:
  13. type: console
  14. process_psr_3_messages: false
  15. level: debug
  16. channels: [ "!event", "!doctrine", "!console" ]
  17. # logging fichier
  18. file_main:
  19. type: rotating_file
  20. path: "%kernel.logs_dir%/%env(LOG_FILE_NAME)%.main.log"
  21. level: debug
  22. max_files: 3
  23. channels: ['!security', '!doctrine', '!cron', '!event', '!deprecation', '!app']
  24. # file_doctrine:
  25. # type: rotating_file
  26. # path: "%kernel.logs_dir%/%env(LOG_FILE_NAME)%.doctrine.log"
  27. # level: debug
  28. # max_files: 3
  29. # channels: [doctrine]
  30. file_auth:
  31. type: rotating_file
  32. path: "%kernel.logs_dir%/%kernel.environment%.auth.log"
  33. level: debug
  34. max_files: 3
  35. channels: [security]
  36. # email en cas d'erreurs critiques, sauf erreurs 404 / 405
  37. # critical:
  38. # type: fingers_crossed
  39. # action_level: critical
  40. # excluded_http_codes: [ 404, 405 ]
  41. # handler: deduplicated
  42. # deduplicated:
  43. # type: deduplication
  44. # handler: mailer
  45. # mailer:
  46. # type: symfony_mailer
  47. # from_email: "process@opentalent.fr"
  48. # to_email: "exploitation@opentalent.fr"
  49. # subject: AP2I - Critical Error Occurred
  50. # level: critical
  51. # formatter: monolog.formatter.html
  52. # content_type: text/html
  53. ### --- Cron-Jobs ---
  54. # Log fichier (niveau debug)
  55. cron_file:
  56. type: rotating_file
  57. path: "%kernel.logs_dir%/%kernel.environment%.cron.log"
  58. level: debug
  59. max_files: 7
  60. formatter: monolog.formatter.message
  61. channels: ['cron']
  62. # Rapport par mail
  63. cron_info:
  64. type: fingers_crossed
  65. action_level: info
  66. handler: cron_info_deduplicated
  67. channels: ['cron']
  68. cron_info_deduplicated:
  69. type: deduplication
  70. # the time in seconds during which duplicate entries are discarded (default: 60)
  71. time: 10
  72. handler: cron_info_mailer
  73. cron_info_mailer:
  74. type: symfony_mailer
  75. from_email: "mail.report@opentalent.fr"
  76. to_email: "exploitation@opentalent.fr"
  77. subject: "Cron - Execution Report"
  78. level: info
  79. content_type: text/html
  80. # Log par mail en cas d'erreur critique
  81. cron_critical:
  82. type: fingers_crossed
  83. action_level: critical
  84. handler: cron_critical_deduplicated
  85. channels: ['cron']
  86. cron_critical_deduplicated:
  87. type: deduplication
  88. # the time in seconds during which duplicate entries are discarded (default: 60)
  89. time: 10
  90. handler: cron_critical_mailer
  91. cron_critical_mailer:
  92. type: symfony_mailer
  93. from_email: "mail.report@opentalent.fr"
  94. to_email: "exploitation@opentalent.fr"
  95. subject: "Cron - Critical Error"
  96. level: critical
  97. formatter: monolog.formatter.html
  98. content_type: text/html
  99. # uncomment to get logging in your browser
  100. # you may have to allow bigger header sizes in your Web server configuration
  101. #firephp:
  102. # type: firephp
  103. # level: info
  104. #chromephp:
  105. # type: chromephp
  106. # level: info