Last active
December 14, 2015 22:29
-
-
Save ynaoto/5159138 to your computer and use it in GitHub Desktop.
An error logger function for debug purpose.
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
function log($msg) | |
{ | |
$args = func_get_args(); | |
array_shift($args); // $msg | |
error_log(array_reduce($args, function($v, $w) { | |
return $v . var_export($w, true); | |
}, $msg)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment