monolog.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. monolog:
  2. channels:
  3. - deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
  4. when@dev:
  5. monolog:
  6. handlers:
  7. main:
  8. type: stream
  9. path: "%kernel.logs_dir%/%kernel.environment%.log"
  10. level: debug
  11. channels: ["!event"]
  12. # uncomment to get logging in your browser
  13. # you may have to allow bigger header sizes in your Web server configuration
  14. #firephp:
  15. # type: firephp
  16. # level: info
  17. #chromephp:
  18. # type: chromephp
  19. # level: info
  20. console:
  21. type: console
  22. process_psr_3_messages: false
  23. channels: ["!event", "!doctrine", "!console"]
  24. when@prod:
  25. monolog:
  26. handlers:
  27. main:
  28. type: fingers_crossed
  29. action_level: error
  30. handler: nested
  31. excluded_http_codes: [404, 405]
  32. buffer_size: 50 # How many messages should be saved? Prevent memory leaks
  33. nested:
  34. type: stream
  35. path: php://stderr
  36. level: debug
  37. formatter: monolog.formatter.json
  38. console:
  39. type: console
  40. process_psr_3_messages: false
  41. channels: ["!event", "!doctrine"]
  42. deprecation:
  43. type: stream
  44. channels: [deprecation]
  45. path: php://stderr