owncloud/core — pull request #12682 by oparoz (2014-12-08 03:18:24+00:00)
Title: Dump Arrays, Objects and Exceptions to the log

This is a first draft. It has only been tested with the ownlcloud logger.
Some internal fields are JSON encoded several times which makes it harder to read.
It's possible to make the output prettier.

You add the variables to the context array like this:
A couple of examples
```
$this->logger->debug("Here is what's inside this FileInfo object: {fileinfo}", array(
'app' => 'myApp',
'fileinfo' => $fileInfo,
));
try {
throw new \Exception("I want to be logged as an Exception!");
} catch (\Exception $e) {
$this->logger->debug("I'm logging the full Exception object here: {exception}", array(
'app' => 'myApp',
'exception' => $e,
));
}
```