Skip to content

Instantly share code, notes, and snippets.

@pkalisz
Created March 4, 2019 21:30
Show Gist options
  • Save pkalisz/ea9fe2b6ed7624ffa535a2e4a251ee7a to your computer and use it in GitHub Desktop.
Save pkalisz/ea9fe2b6ed7624ffa535a2e4a251ee7a to your computer and use it in GitHub Desktop.
monolog config
monolog:
channels: ["usage", "api"]
handlers:
main:
type: fingers_crossed
action_level: error
excluded_404s:
- ^/
handler: nested
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
max_files: 7
formatter: Monolog\Formatter\JsonFormatter
channels: ["!usage", "!api"]
usage:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%-usage.log"
level: info
max_files: 7
formatter: Monolog\Formatter\JsonFormatter
channels: ["usage"]
api:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%-api.log"
level: info
max_files: 7
formatter: Monolog\Formatter\JsonFormatter
channels: ["api"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment