How can one use a defined channel, in monolog handler from a tagged service?

How can one use a defined channel, in monolog handler from a tagged service?

I have the following monolog handler definitions:

I have the following monolog handler definitions:

    # config_prod.yml
    app_generic:
        type: rotating_file
        max_files:      15
        path: "%param.app_logging_config.log_generic_file%"
        level: info
        channels: [app]

app_api:
     max_files: 15
     path: "%param.app_logging_config.log_api_file%"
     level: info
     channels: [app]
     level: info

app_response:
    max_files: 15
    path: "%param.app_logging_config.log_response_file%"
    channels: [app]
    level: info

And in service.yml, my intention is to inject monolog (@logger) with an array of the above defined handlers.

#service.yml
app.app_logger:
    class: AppBundle\Classes\AppLogger
    arguments: ['@logger': ['@app_generic', '@app_api', '@app_response']]
    calls:
      - [init, ['%app_logging_config%']
    tags:
      - { name: monolog.logger, channel: app }

How does one pass arguments to an injected argument?

  • Update:

Re-reading the description, I was going for this approach, by just tagging on the service definition:

app.logger:
    arguments: ['@logger']
    tags:
        - { name: monolog.logger, channel: app }
channels: ['app']

Or even ( if I understood correctly), adding a channels: ['app'] key and just having this in service argument:

app.logger:
    arguments: ['@monolog.logger.app']

I have not been able to use ( or see via dump ) the handlers defined in config_prod.yml. I have placed these at top because of other "fingers_crossed" handlers I thought may interfere.

I woud like to know, why neither of above (documented) approaches seem to work?

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Why is this Symfony annotation not working?

Before I start, I should mention that this is&nbsp;<strong>Symfony 2.8.25</strong>. (I just started working on this code base, and once we get some critical issues resolved, we'll be upgrading.)

What is Symfony? Features and applications

**Symfony is a PHP framework** whose work in building and maintaining web applications works very quickly and turns into recurring coding tasks. There are some prerequisites to start it in your computer-Such as - Linux, FreeBSD, Mac OS or...