php-fig/log — pull request #14 by christiaan (2013-11-07 14:14:42+00:00)
Title: CallbackLogger to create easy ad hoc logger instances.

A logger basically only consists of a single function to log. This class makes it easy to create a ad hoc logger.

If one wants to output all log messages to the stdout in a cli script one can now just do

```php
$loggerAware->setLogger(new CallbackLogger(function($level, $message, array $context) {
echo $level . ': ' . $message . "\n";
});
```

I can imagine this also being a great addition to create a MockLogger in unit tests. Altough you're probably better off with a shared MockLogger class there anyway.