😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.
<?PHP
use Tracy\ILogger;
use Tracy\Debugger;
use Tracy\Bridges\Psr\PsrToTracyLoggerAdapter;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
require_once "vendor/autoload.php";
$monolog = new Logger('main-channel');
$monolog->pushHandler(new StreamHandler("/private/tmp/ok/lol.log", Logger::DEBUG));
$tracyLogger = new PsrToTracyLoggerAdapter($monolog);
Debugger::setLogger($tracyLogger);
Debugger::enable();
Debugger::log("info");
Debugger::log('warning', ILogger::WARNING);
I tested with the following code:
index.php
composer.json