Created
October 19, 2011 09:00
-
-
Save m4rcsch/1297788 to your computer and use it in GitHub Desktop.
Lithium (li3) Logger Helper for lazy coders..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Inspect the message, and do a string conversion via print_r | |
* | |
* @author: 2011 weluse GmbH, Marc Schwering | |
*/ | |
Logger::applyFilter('write', function ($self, $params, $chain){ | |
$var = $params['message']; | |
if(is_array($var) || is_object($var)){ | |
$params['message'] = print_r($var,true); | |
} | |
return $chain->next($self, $params, $chain); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment