Files
myep/config/packages/monolog.yaml
T

108 lines
3.6 KiB
YAML

monolog:
channels:
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
- bpn
- core
- auth
when@dev:
monolog:
handlers:
database:
type: service
id: App\Logger\DatabaseHandler
channels: ["core", "bpn", "auth"]
bpn:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.bpn.log"
level: debug
channels: ["bpn"]
auth:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.auth.log"
level: debug
channels: ["auth"]
core:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.core.log"
level: debug
channels: ["core"]
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event", "!bpn", "!core", "!auth"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
when@test:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
channels: ["!event"]
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
when@prod:
monolog:
handlers:
database:
type: service
id: App\Logger\DatabaseHandler
channels: ["core", "bpn", "auth"]
bpn:
type: rotating_file
max_files: 7
path: "%kernel.logs_dir%/%kernel.environment%.bpn.log"
level: info
channels: ["bpn"]
auth:
type: rotating_file
max_files: 7
path: "%kernel.logs_dir%/%kernel.environment%.auth.log"
level: info
channels: ["auth"]
core:
type: rotating_file
max_files: 7
path: "%kernel.logs_dir%/%kernel.environment%.core.log"
level: info
channels: ["core"]
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
channels: ["!bpn", "!core", "!auth"]
nested:
type: rotating_file
path: "%kernel.logs_dir%/%kernel.environment%.framework.log"
max_files: 30
level: error
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
channels: [deprecation]
path: php://stderr
formatter: monolog.formatter.json