forked from bazo/nette-monolog-extension
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
TLDR: Is there any support for multiple channels in a single extension?
I want to log SQL queries separately besides logging exceptions (ideally to have another instance of Monolog\Logger) so I tried to register multiple MonologExtensions like this:
extensions:
monolog.errors: Kdyby\Monolog\DI\MonologExtension
monolog.sql: Kdyby\Monolog\DI\MonologExtension
monolog.errors:
name: errors
monolog.sql:
name: sql
registerFallback: no
hookToTracy: no
handlers:
...
The problem is that handlers from monolog.sql have "global" tag monolog.handler so monolog.errors uses them as well. Instead I would like the tag prefixed (monolog.sql.handler) so you can register the extension multiple times.
Is this a valid solution, should I send PR (it's a BC break)?
Metadata
Metadata
Assignees
Labels
No labels