Home › Forums › WordPress › Config Setup › Write to debug.log file.
- This topic has 0 replies, 1 voice, and was last updated 8 years, 3 months ago by Layer7web.
Viewing 0 reply threads
-
AuthorPosts
-
-
August 13, 2016 at 6:11 pm #2376
Layer7webKeymasterWith define(‘WP_DEBUG_LOG’, true); set in wp-config.php you can write to the debug log from your script with:
write_log( string );
Write to debug.logPHP1234567891011if (!function_exists('write_log')) {function write_log ( $log ) {if ( true === WP_DEBUG ) {if ( is_array( $log ) || is_object( $log ) ) {error_log( print_r( $log, true ) );} else {error_log( $log );}}}}
-
-
AuthorPosts
Viewing 0 reply threads
You must be logged in to reply to this topic.
Comments are closed.