Skip to content

Instantly share code, notes, and snippets.

@jondcampbell
Created April 25, 2018 23:16
Show Gist options
  • Save jondcampbell/ef652c42ccf51a7a3ad8ce51fd542e72 to your computer and use it in GitHub Desktop.
Save jondcampbell/ef652c42ccf51a7a3ad8ce51fd542e72 to your computer and use it in GitHub Desktop.
WordPress log anything
function logger($log){
if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
} else {
error_log( $log );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment