monolog.yaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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@test:
  25. monolog:
  26. handlers:
  27. main:
  28. type: fingers_crossed
  29. action_level: error
  30. handler: nested
  31. excluded_http_codes: [404, 405]
  32. channels: ["!event"]
  33. nested:
  34. type: stream
  35. path: "%kernel.logs_dir%/%kernel.environment%.log"
  36. level: debug
  37. when@prod:
  38. monolog:
  39. handlers:
  40. main:
  41. type: fingers_crossed
  42. action_level: error
  43. handler: nested
  44. excluded_http_codes: [404, 405]
  45. buffer_size: 50 # How many messages should be saved? Prevent memory leaks
  46. nested:
  47. type: stream
  48. path: php://stderr
  49. level: debug
  50. formatter: monolog.formatter.json
  51. console:
  52. type: console
  53. process_psr_3_messages: false
  54. channels: ["!event", "!doctrine"]
  55. deprecation:
  56. type: stream
  57. channels: [deprecation]
  58. path: php://stderr
  59. formatter: monolog.formatter.json