diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index c6ee1ec..90af5ea 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml @@ -13,15 +13,25 @@ monolog: main: type: fingers_crossed action_level: error - handler: nested - nested: + handler: main_grouped + main_grouped: + type: group + members: [rotated_file, telegram_deduplicated] + bubble: false + rotated_file: type: rotating_file path: "%kernel.logs_dir%/%kernel.environment%.log" max_files: 30 level: debug + telegram_deduplicated: + type: deduplication + action_level: error + handler: telegram + time: 600 telegram: type: service id: app.log.telegram_handler action_level: error + # for commands console: - type: console + type: console diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/services.yml b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/services.yml index f56d466..e2db511 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/services.yml +++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/services.yml @@ -44,6 +44,8 @@ services: - '@logger' - '@app.point.subscription_repository' - '@app.point.subscription_record_repository' + tags: + - { name: monolog.logger, channel: subscribers_update } # Console commands @@ -57,7 +59,9 @@ services: - [setApiClient, ['@app.point.api_user']] - [setApiDelay, ['%point_api_delay%']] - [setSubscriptionManager, ['@app.point.subscriptions_manager']] - tags: [{ name: console.command }] + tags: + - { name: console.command } + - { name: monolog.logger, channel: subscribers_update } # Webhook management app.telegram.webhook_command: class: Skobkin\Bundle\PointToolsBundle\Command\TelegramWebHookCommand