Created
February 15, 2017 06:01
-
-
Save kenanfallon/6c4dc429cc10342b80bc835c6de78e97 to your computer and use it in GitHub Desktop.
WordPress write to debug.log
This file contains hidden or 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
if ( ! function_exists('write_log')) { | |
function write_log ( $log ) { | |
if ( is_array( $log ) || is_object( $log ) ) { | |
error_log( print_r( $log, true ) ); | |
} else { | |
error_log( $log ); | |
} | |
} | |
} | |
write_log( __LINE__ ); | |
Credit: https://www.elegantthemes.com/blog/tips-tricks/using-the-wordpress-debug-log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment