Skip to content

Instantly share code, notes, and snippets.

@ChuckMac
Created June 28, 2017 12:23
Show Gist options
  • Save ChuckMac/362aa2c831b0bb2b745bf55474380358 to your computer and use it in GitHub Desktop.
Save ChuckMac/362aa2c831b0bb2b745bf55474380358 to your computer and use it in GitHub Desktop.
Simple Debugging With WordPress error log
if(!function_exists('log_it')){
function log_it( $message ) {
if( WP_DEBUG === true ){
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