monolog.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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: [php, doctrine, http_client, elastica]
  24. file_auth:
  25. type: rotating_file
  26. path: "%kernel.logs_dir%/%kernel.environment%.auth.log"
  27. level: debug
  28. max_files: 3
  29. channels: security
  30. # email en cas d'erreurs critiques, sauf erreurs 404 / 405
  31. # critical:
  32. # type: fingers_crossed
  33. # action_level: critical
  34. # excluded_http_codes: [ 404, 405 ]
  35. # handler: deduplicated
  36. # deduplicated:
  37. # type: deduplication
  38. # handler: mailer
  39. # mailer:
  40. # type: symfony_mailer
  41. # from_email: "process@opentalent.fr"
  42. # to_email: "exploitation@opentalent.fr"
  43. # subject: AP2I - Critical Error Occurred
  44. # level: critical
  45. # formatter: monolog.formatter.html
  46. # content_type: text/html
  47. ### --- Cron-Jobs ---
  48. # Log fichier (niveau debug)
  49. cron_file:
  50. type: rotating_file
  51. path: "%kernel.logs_dir%/%kernel.environment%.cron.log"
  52. level: debug
  53. max_files: 7
  54. formatter: monolog.formatter.message
  55. channels: [cron]
  56. # Rapport par mail
  57. cron_info:
  58. type: fingers_crossed
  59. action_level: info
  60. handler: cron_info_deduplicated
  61. channels: ['cron']
  62. cron_info_deduplicated:
  63. type: deduplication
  64. # the time in seconds during which duplicate entries are discarded (default: 60)
  65. time: 10
  66. handler: cron_info_mailer
  67. cron_info_mailer:
  68. type: symfony_mailer
  69. from_email: "mail.report@opentalent.fr"
  70. to_email: "exploitation@opentalent.fr"
  71. subject: "Cron - Execution Report"
  72. level: info
  73. content_type: text/html
  74. # Log par mail en cas d'erreur critique
  75. cron_critical:
  76. type: fingers_crossed
  77. action_level: critical
  78. handler: cron_critical_deduplicated
  79. cron_critical_deduplicated:
  80. type: deduplication
  81. # the time in seconds during which duplicate entries are discarded (default: 60)
  82. time: 10
  83. handler: cron_critical_mailer
  84. cron_critical_mailer:
  85. type: symfony_mailer
  86. from_email: "mail.report@opentalent.fr"
  87. to_email: "exploitation@opentalent.fr"
  88. subject: "Cron - Critical Error"
  89. level: critical
  90. formatter: monolog.formatter.html
  91. content_type: text/html
  92. # uncomment to get logging in your browser
  93. # you may have to allow bigger header sizes in your Web server configuration
  94. #firephp:
  95. # type: firephp
  96. # level: info
  97. #chromephp:
  98. # type: chromephp
  99. # level: info