Setup monolog channels
This commit is contained in:
parent
d8934e2cf5
commit
1d8a4a7215
|
|
@ -1,5 +1,12 @@
|
|||
monolog:
|
||||
channels:
|
||||
- user_management
|
||||
- authentication
|
||||
- organization_management
|
||||
- access_control
|
||||
- email_notifications
|
||||
- admin_actions
|
||||
- security
|
||||
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
|
||||
|
||||
when@dev:
|
||||
|
|
@ -40,23 +47,58 @@ when@test:
|
|||
when@prod:
|
||||
monolog:
|
||||
handlers:
|
||||
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
|
||||
nested:
|
||||
# User Management
|
||||
user_management:
|
||||
type: stream
|
||||
path: php://stderr
|
||||
level: debug
|
||||
path: "%kernel.logs_dir%/user_management.log"
|
||||
level: info
|
||||
channels: [user_management]
|
||||
formatter: monolog.formatter.json
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine"]
|
||||
deprecation:
|
||||
|
||||
# Authentication
|
||||
authentication:
|
||||
type: stream
|
||||
channels: [deprecation]
|
||||
path: php://stderr
|
||||
path: "%kernel.logs_dir%/authentication.log"
|
||||
level: info
|
||||
channels: [authentication]
|
||||
formatter: monolog.formatter.json
|
||||
|
||||
# Organization Management
|
||||
organization_management:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/organization_management.log"
|
||||
level: info
|
||||
channels: [organization_management]
|
||||
formatter: monolog.formatter.json
|
||||
|
||||
# Access Control
|
||||
access_control:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/access_control.log"
|
||||
level: info
|
||||
channels: [access_control]
|
||||
formatter: monolog.formatter.json
|
||||
|
||||
# Email Notifications
|
||||
email_notifications:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/email_notifications.log"
|
||||
level: info
|
||||
channels: [email_notifications]
|
||||
formatter: monolog.formatter.json
|
||||
|
||||
# Admin Actions
|
||||
admin_actions:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/admin_actions.log"
|
||||
level: info
|
||||
channels: [admin_actions]
|
||||
formatter: monolog.formatter.json
|
||||
|
||||
# Security
|
||||
security:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/security.log"
|
||||
level: warning
|
||||
channels: [security]
|
||||
formatter: monolog.formatter.json
|
||||
|
|
|
|||
Loading…
Reference in New Issue