monolog.yaml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. # email en cas d'erreurs critiques, sauf erreurs 404 / 405
  38. # critical:
  39. # type: fingers_crossed
  40. # action_level: critical
  41. # excluded_http_codes: [ 404, 405 ]
  42. # handler: deduplicated
  43. # deduplicated:
  44. # type: deduplication
  45. # handler: mailer
  46. # mailer:
  47. # type: symfony_mailer
  48. # from_email: "process@opentalent.fr"
  49. # to_email: "exploitation@opentalent.fr"
  50. # subject: AP2I - Critical Error Occurred
  51. # level: critical
  52. # formatter: monolog.formatter.html
  53. # content_type: text/html
  54. ### --- Cron-Jobs ---
  55. # Log fichier (niveau debug)
  56. cron_file:
  57. type: rotating_file
  58. path: "%kernel.logs_dir%/%kernel.environment%.cron.log"
  59. level: debug
  60. max_files: 7
  61. formatter: monolog.formatter.message
  62. channels: ['cron']
  63. # Rapport par mail
  64. cron_info:
  65. type: fingers_crossed
  66. action_level: info
  67. handler: cron_info_deduplicated
  68. channels: ['cron']
  69. cron_info_deduplicated:
  70. type: deduplication
  71. # the time in seconds during which duplicate entries are discarded (default: 60)
  72. time: 10
  73. handler: cron_info_mailer
  74. cron_info_mailer:
  75. type: symfony_mailer
  76. from_email: "mail.report@opentalent.fr"
  77. to_email: "exploitation@opentalent.fr"
  78. subject: "Cron - Execution Report"
  79. level: info
  80. content_type: text/html
  81. # Log par mail en cas d'erreur critique
  82. cron_critical:
  83. type: fingers_crossed
  84. action_level: critical
  85. handler: cron_critical_deduplicated
  86. channels: ['cron']
  87. cron_critical_deduplicated:
  88. type: deduplication
  89. # the time in seconds during which duplicate entries are discarded (default: 60)
  90. time: 10
  91. handler: cron_critical_mailer
  92. cron_critical_mailer:
  93. type: symfony_mailer
  94. from_email: "mail.report@opentalent.fr"
  95. to_email: "exploitation@opentalent.fr"
  96. subject: "Cron - Critical Error"
  97. level: critical
  98. formatter: monolog.formatter.html
  99. content_type: text/html
  100. ### --- Admin operations ---
  101. # Log fichier (niveau debug)
  102. admin_file:
  103. type: rotating_file
  104. path: "%kernel.logs_dir%/%kernel.environment%.admin.log"
  105. level: debug
  106. max_files: 7
  107. formatter: monolog.formatter.message
  108. channels: ['admin']
  109. # Rapport par mail
  110. admin_info:
  111. type: fingers_crossed
  112. action_level: info
  113. handler: cron_info_deduplicated
  114. channels: ['admin']
  115. admin_info_deduplicated:
  116. type: deduplication
  117. # the time in seconds during which duplicate entries are discarded (default: 60)
  118. time: 10
  119. handler: admin_info_mailer
  120. admin_info_mailer:
  121. type: symfony_mailer
  122. from_email: "mail.report@opentalent.fr"
  123. to_email: "exploitation@opentalent.fr"
  124. subject: "Administration - Execution Report"
  125. level: info
  126. content_type: text/html
  127. # Log par mail en cas d'erreur critique
  128. admin_critical:
  129. type: fingers_crossed
  130. action_level: critical
  131. handler: admin_critical_deduplicated
  132. channels: ['admin']
  133. admin_critical_deduplicated:
  134. type: deduplication
  135. # the time in seconds during which duplicate entries are discarded (default: 60)
  136. time: 10
  137. handler: admin_critical_mailer
  138. admin_critical_mailer:
  139. type: symfony_mailer
  140. from_email: "mail.report@opentalent.fr"
  141. to_email: "exploitation@opentalent.fr"
  142. subject: "Administration - Critical Error"
  143. level: critical
  144. formatter: monolog.formatter.html
  145. content_type: text/html
  146. # uncomment to get logging in your browser
  147. # you may have to allow bigger header sizes in your Web server configuration
  148. #firephp:
  149. # type: firephp
  150. # level: info
  151. #chromephp:
  152. # type: chromephp
  153. # level: info