Update monolog configuration and extend logrotate for notifier logs
Revised `monolog.yaml` to add a new "notifier" channel, updated handlers, and adjusted log settings. Extended logrotate configuration to include rotation rules for notifier logs, ensuring proper log management.
This commit is contained in:
@@ -1,20 +1,33 @@
|
|||||||
# this file is managed by ansible. Do not edit it by hand
|
# this file is managed by ansible. Do not edit it by hand
|
||||||
|
|
||||||
|
#
|
||||||
|
# NOTE: the ansible-role-chill will also configure a rule for logrotate, so,
|
||||||
|
# we do not need to configure log rotation here
|
||||||
|
#
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
log_prefix: {{ item.chill_environment }}
|
log_prefix: 'test'
|
||||||
monolog:
|
monolog:
|
||||||
handlers:
|
# make a "notifier" channel available
|
||||||
default_log:
|
channels: ['notifier']
|
||||||
type: stream
|
handlers:
|
||||||
path: "%kernel.logs_dir%/privacy-%log_prefix%.log"
|
notifier_log:
|
||||||
level: info
|
type: stream
|
||||||
channels: ['chill']
|
path: "%kernel.logs_dir%/notifier-%log_prefix%.log"
|
||||||
chill_log:
|
level: info
|
||||||
type: stream
|
channels: [ 'notifier' ]
|
||||||
path: "%kernel.logs_dir%/default-%log_prefix%.log"
|
privacy_log:
|
||||||
level: info
|
type: stream
|
||||||
channels: ['!event', '!doctrine', '!console', '!chill']
|
path: "%kernel.logs_dir%/privacy-%log_prefix%.log"
|
||||||
console:
|
level: info
|
||||||
type: console
|
channels: [ 'chill' ]
|
||||||
process_psr_3_messages: false
|
default_log:
|
||||||
channels: ['!event', '!doctrine', '!console']
|
type: stream
|
||||||
bubble: false
|
path: "%kernel.logs_dir%/default-%log_prefix%.log"
|
||||||
|
level: info
|
||||||
|
channels: [ '!event', '!doctrine', '!console', '!chill',]
|
||||||
|
console:
|
||||||
|
type: console
|
||||||
|
process_psr_3_messages: false
|
||||||
|
channels: [ '!event', '!doctrine', '!console']
|
||||||
|
bubble: true
|
||||||
|
|||||||
@@ -14,4 +14,13 @@
|
|||||||
compress
|
compress
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/var/log/apt/notifier-*.log {
|
||||||
|
su php-fpm php-fpm
|
||||||
|
rotate 800
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user