monolog.yaml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. monolog:
  2. channels:
  3. - deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
  4. - cron
  5. - admin
  6. handlers:
  7. # sorties standards (stdout, stderr, console)
  8. stderr:
  9. type: stream
  10. path: php://stderr
  11. level: error
  12. channels: [ "!event", "!doctrine", "!cron" ]
  13. console:
  14. type: console
  15. process_psr_3_messages: false
  16. level: debug
  17. channels: [ "!event", "!doctrine", "!console" ]
  18. # logging fichier
  19. file_main:
  20. type: rotating_file
  21. path: "%kernel.logs_dir%/%env(LOG_FILE_NAME)%.main.log"
  22. level: debug
  23. max_files: 3
  24. channels: ['!security', '!doctrine', '!cron', '!event', '!deprecation', '!app']
  25. # file_doctrine:
  26. # type: rotating_file
  27. # path: "%kernel.logs_dir%/%env(LOG_FILE_NAME)%.doctrine.log"
  28. # level: debug
  29. # max_files: 3
  30. # channels: [doctrine]
  31. file_auth:
  32. type: rotating_file
  33. path: "%kernel.logs_dir%/%kernel.environment%.auth.log"
  34. level: debug
  35. max_files: 3
  36. channels: [security]
  37. file_depreciation:
  38. type: rotating_file
  39. path: "%kernel.logs_dir%/%kernel.environment%.deprecation.log"
  40. level: debug
  41. max_files: 3
  42. channels: [deprecation]
  43. # email en cas d'erreurs critiques, sauf erreurs 404 / 405
  44. # critical:
  45. # type: fingers_crossed
  46. # action_level: critical
  47. # excluded_http_codes: [ 404, 405 ]
  48. # handler: deduplicated
  49. # deduplicated:
  50. # type: deduplication
  51. # handler: mailer
  52. # mailer:
  53. # type: symfony_mailer
  54. # from_email: "process@opentalent.fr"
  55. # to_email: "exploitation@opentalent.fr"
  56. # subject: AP2I - Critical Error Occurred
  57. # level: critical
  58. # formatter: monolog.formatter.html
  59. # content_type: text/html
  60. ### --- Cron-Jobs ---
  61. # Log fichier (niveau debug)
  62. cron_file:
  63. type: rotating_file
  64. path: "%kernel.logs_dir%/%kernel.environment%.cron.log"
  65. level: debug
  66. max_files: 7
  67. formatter: monolog.formatter.message
  68. channels: ['cron']
  69. # Rapport par mail
  70. cron_info:
  71. type: fingers_crossed
  72. action_level: info
  73. handler: cron_info_deduplicated
  74. channels: ['cron']
  75. cron_info_deduplicated:
  76. type: deduplication
  77. # the time in seconds during which duplicate entries are discarded (default: 60)
  78. time: 10
  79. handler: cron_info_mailer
  80. cron_info_mailer:
  81. type: symfony_mailer
  82. from_email: "mail.report@opentalent.fr"
  83. to_email: "exploitation@opentalent.fr"
  84. subject: "Cron - Execution Report"
  85. level: info
  86. content_type: text/html
  87. # Log par mail en cas d'erreur critique
  88. cron_critical:
  89. type: fingers_crossed
  90. action_level: critical
  91. handler: cron_critical_deduplicated
  92. channels: ['cron']
  93. cron_critical_deduplicated:
  94. type: deduplication
  95. # the time in seconds during which duplicate entries are discarded (default: 60)
  96. time: 10
  97. handler: cron_critical_mailer
  98. cron_critical_mailer:
  99. type: symfony_mailer
  100. from_email: "mail.report@opentalent.fr"
  101. to_email: "exploitation@opentalent.fr"
  102. subject: "Cron - Critical Error"
  103. level: critical
  104. formatter: monolog.formatter.html
  105. content_type: text/html
  106. ### --- Admin operations ---
  107. # Log fichier (niveau debug)
  108. admin_file:
  109. type: rotating_file
  110. path: "%kernel.logs_dir%/%kernel.environment%.admin.log"
  111. level: debug
  112. max_files: 7
  113. formatter: monolog.formatter.message
  114. channels: ['admin']
  115. # Rapport par mail
  116. admin_info:
  117. type: fingers_crossed
  118. action_level: info
  119. handler: admin_info_deduplicated
  120. channels: ['admin']
  121. admin_info_deduplicated:
  122. type: deduplication
  123. # the time in seconds during which duplicate entries are discarded (default: 60)
  124. time: 10
  125. handler: admin_info_mailer
  126. admin_info_mailer:
  127. type: symfony_mailer
  128. from_email: "mail.report@opentalent.fr"
  129. to_email: "exploitation@opentalent.fr"
  130. subject: "Administration - Execution Report"
  131. level: info
  132. content_type: text/html
  133. # Log par mail en cas d'erreur critique
  134. admin_critical:
  135. type: fingers_crossed
  136. action_level: critical
  137. handler: admin_critical_deduplicated
  138. channels: ['admin']
  139. admin_critical_deduplicated:
  140. type: deduplication
  141. # the time in seconds during which duplicate entries are discarded (default: 60)
  142. time: 10
  143. handler: admin_critical_mailer
  144. admin_critical_mailer:
  145. type: symfony_mailer
  146. from_email: "mail.report@opentalent.fr"
  147. to_email: "exploitation@opentalent.fr"
  148. subject: "Administration - Critical Error"
  149. level: critical
  150. formatter: monolog.formatter.html
  151. content_type: text/html
  152. # uncomment to get logging in your browser
  153. # you may have to allow bigger header sizes in your Web server configuration
  154. #firephp:
  155. # type: firephp
  156. # level: info
  157. #chromephp:
  158. # type: chromephp
  159. # level: info