Integration between Tracy and Nette/IMailer
- Jan Tvrdík
- Nette guru | 2595
You can set Tracy\Debugger()::getLogger()->mailer
to callback
of your choice. No built-in integration between Tracy and Nette\Mail is AFAIK
currently available.
- 2bfree
- Member | 248
Current hotfix solution we used is
thanks for help.
Last edited by 2bfree (2017-01-04 10:13)
- Jan Tvrdík
- Nette guru | 2595
cc @DavidGrudl How do you feel about adding this bridge to Tracy?
@2bfree Does it work without the factory:
line?
- 2bfree
- Member | 248
The factory
line is copy of the native tracy.logger
service definition from the native DI extension.
As I understand the Neon DI definition, there is no way to
overwrite definition of the service by just adding the setup. I thing
that you can overwrite all or nothing and there is no way to define the
service
without class
, factory
or
implement
definition? Or am I wrong?
- Jan Tvrdík
- Nette guru | 2595
@2bfree So, have you actually tried it without the
factory:
line? Or do you just believe that it will not work?
If it does not work, we should look into making it work. The first thing you can try is to remove the condition on lines 91 and 93 in TracyExtension, so the code look like this.
- David Grudl
- Nette Core | 8254
Jan Tvrdík wrote:
cc @DavidGrudl How do you feel about adding this bridge to Tracy?
How should it look like?
- Jan Tvrdík
- Nette guru | 2595
@DavidGrudl Sth like https://gist.github.com/…e2c43e2c9ce5,
but with less code duplication, i.e. class accepting IMailer
in
constructor and providing (with method or __invoke
) the callback
required by Tracy.