zendframework/zf2 — pull request #2260 by b-durand (2012-08-29 18:29:59+00:00)
Title: Hotfix BC for extra in Log\Formatter\Simple

Hello folks :smiley:

ZF2 key is [**extra**](https://github.com/zendframework/zf2/blob/master/library/Zend/Log/Logger.php#L257), Simple Formatter uses the legacy (ZF1) key (= [**info**](https://github.com/zendframework/zf2/blob/master/library/Zend/Log/Formatter/Simple.php#L23)). It is not functional with Logger class.

The refactor introduces a **base formatter** in order to normalize in string value all non-scalar data in **extra** array.
I made the choice to use the json_encode instead of var_export for arrays, and objects. I think we should keep consistency for the [message in Logger](https://github.com/zendframework/zf2/blob/master/library/Zend/Log/Logger.php#L247-L249) when it's an array.

We can update others formatters to avoid the errors of a backend with a variable type (like an instance of DateTime, a resource, etc).

Greetings.