Multiple services of type Tracy\ILogger found
- washo
- Member | 88
Hello, have you ever tried to have another logger (Tracy\Logger) in the app?
I would like to have another named log service for some manualy loged errors,
but I'm getting exception ‘Service 'application.2’: Multiple services of
type Tracy\ILogger found' .
Second logger has it's name. But is there any way how to disable autowiring for
this one?
services:
...
apiLogger: Tracy\Logger(%logDir%/apiLogs)
apiClient: App\Api\Client(%apiClient%, @apiLogger)
...
- David Matějka
- Moderator | 6445
Hi, yes, you can disable autowiring for your logging service. see the doc: https://doc.nette.org/…onfiguration#…
- washo
- Member | 88
David Matějka wrote:
Hi, yes, you can disable autowiring for your logging service. see the doc: https://doc.nette.org/…onfiguration#…
Man, thank you, you are awesome. I've missed the link this comprehensive neon doc.