jbroadway/analog

Direct output

Nerahikada opened this issue · 2 comments

Is there a way to output logs directly (to the console, etc.)?

Should I implement it myself or send a pull request?

lux commented

There isn't a specific handler for that (the closest is probably Stderr), but I imagine a simple "Echo" handler could do the trick. Something like this ought to work:

namespace Analog\Handler;

class Echo {
	public static function init () {
		return function ($info) {
			vprintf (\Analog\Analog::$format, $info);
		};
	}
}

Happy to accept a PR for it too :)