|
|
@@ -7,7 +7,7 @@ monolog:
|
|
|
type: stream
|
|
|
path: php://stderr
|
|
|
level: error
|
|
|
- channels: ["!event", "!doctrine"]
|
|
|
+ channels: ["!event", "!doctrine", "!cron"]
|
|
|
console:
|
|
|
type: console
|
|
|
process_psr_3_messages: false
|
|
|
@@ -46,36 +46,61 @@ monolog:
|
|
|
max_files: 3
|
|
|
channels: security
|
|
|
|
|
|
- # logs dédiés à l'exécution des cron-jobs
|
|
|
+
|
|
|
+
|
|
|
+ ### --- Cron-Jobs ---
|
|
|
cron:
|
|
|
type: group
|
|
|
members: [cron_file]
|
|
|
channels: cron
|
|
|
+ # Log fichier (niveau debug)
|
|
|
cron_file:
|
|
|
type: rotating_file
|
|
|
path: "%kernel.logs_dir%/%kernel.environment%.cron.log"
|
|
|
level: debug
|
|
|
max_files: 7
|
|
|
formatter: monolog.formatter.message
|
|
|
+
|
|
|
+ # Rapport par mail
|
|
|
+ cron_info:
|
|
|
+ type: fingers_crossed
|
|
|
+ action_level: info
|
|
|
+ handler: cron_info_deduplicated
|
|
|
+ channels: ['cron']
|
|
|
+ cron_info_deduplicated:
|
|
|
+ type: deduplication
|
|
|
+ # the time in seconds during which duplicate entries are discarded (default: 60)
|
|
|
+ time: 10
|
|
|
+ handler: cron_info_mailer
|
|
|
+ cron_info_mailer:
|
|
|
+ type: symfony_mailer
|
|
|
+ from_email: "cron@opentalent.fr"
|
|
|
+ to_email: "exploitation@opentalent.fr"
|
|
|
+ subject: "Cron - Execution Report"
|
|
|
+ level: info
|
|
|
+ content_type: text/html
|
|
|
+
|
|
|
+ # Log par mail en cas d'erreur critique
|
|
|
cron_critical:
|
|
|
type: fingers_crossed
|
|
|
action_level: critical
|
|
|
- handler: cron_deduplicated
|
|
|
- cron_deduplicated:
|
|
|
+ handler: cron_critical_deduplicated
|
|
|
+ cron_critical_deduplicated:
|
|
|
type: deduplication
|
|
|
# the time in seconds during which duplicate entries are discarded (default: 60)
|
|
|
time: 10
|
|
|
- handler: cron_mailer
|
|
|
- cron_mailer:
|
|
|
+ handler: cron_critical_mailer
|
|
|
+ cron_critical_mailer:
|
|
|
type: symfony_mailer
|
|
|
from_email: "cron@opentalent.fr"
|
|
|
to_email: "exploitation@opentalent.fr"
|
|
|
subject: "Cron - Critical Error"
|
|
|
- level: error
|
|
|
+ level: critical
|
|
|
formatter: monolog.formatter.html
|
|
|
content_type: text/html
|
|
|
|
|
|
|
|
|
+
|
|
|
# uncomment to get logging in your browser
|
|
|
# you may have to allow bigger header sizes in your Web server configuration
|
|
|
#firephp:
|