Skip to content

Instantly share code, notes, and snippets.

@joewanko
Last active April 7, 2017 09:01
Show Gist options
  • Save joewanko/211b14580644866191ca to your computer and use it in GitHub Desktop.
Save joewanko/211b14580644866191ca to your computer and use it in GitHub Desktop.
PHP Logging Function
if(!function_exists('_log')){
function _log($message) {
if(is_array($message) || is_object($message)) {
error_log(print_r($message, true));
} else {
error_log($message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment