PHP: How to use monolog to log to console (php://out)?
The solution is rather simple. Since the example shows a StreamHandler it’s possible to pass in a stream (instead of the path to a file). By default, everything that is echo’ed in PHP is written to php://stdout / php://output so we can simple use one of those as stream for the StreamHandler: <?php use Monolog\Logger; … Read more