Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
PSR-3 adapter #314
@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
$psrLogger = new Monolog\Logger(...); $tracyLogger = new Tracy\Bridges\Psr\PsrLoggerAdapter($psrLogger); Tracy\Debugger::setLogger($tracyLogger);
Or we could even apply the adapter automatically, so the following would be possible:
$psrLogger = new Monolog\Logger(...); Tracy\Debugger::setLogger($psrLogger);
@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);
If it is really useful, surely. (I suppose otherwise you wouldn't want it.)
It looks nice, but it means that the code in
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.