New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSR-3 adapter #314
PSR-3 adapter #314
Conversation
@dg Related question – would you accept PR with $tracyLogger = Tracy\Debugger::getLogger();
$psrLogger = new Tracy\Bridges\Psr\TracyLoggerToPsrLoggerAdapter($tracyLogger);
$monolog = new Monolog\Logger(...);
$monolog->pushHandler(new Monolog\Handler\SyslogHandler(...));
$monolog->pushHandler(new Monolog\Handler\PsrHandler($psrLogger));
// ...
$tracyLogger = new Tracy\Bridges\Psr\PsrLoggerToTracyLoggerAdapter($monolog);
Tracy\Debugger::setLogger($tracyLogger); |
Alternative is to put those adapters to https://github.com/contributte/psr3-logging cc @f3l1x |
We can put these adapters into https://github.com/contributte/psr3-logging, if it'll be not part of the Tracy. |
If it is really useful, surely. (I suppose otherwise you wouldn't want it.)
It looks nice, but it means that the code in
Names |
The issue has been converted to PR with implementation. The tests failed on Travis with and odd error
which looks like either Tester (cc @milo) or PHP bug. Not directly, but indirectly, yes.
|
I restarted the build on Travis by using close-reopen combo and the test now works. |
Cool. |
Thanks, merged. |
When will be this released ? |
Nette 3.0 |
@dg Would you accept PR with PSR-3 adapter? So it would be possible to use any PSR-3 compatible logger (e.g. Monolog) with Tracy, i.e. the following would be possible
Or we could even apply the adapter automatically, so the following would be possible: