Last active
March 21, 2025 05:23
-
-
Save kobaatsu/bb28ee79038a8e1fc974930e5202ce41 to your computer and use it in GitHub Desktop.
functions.phpでのログ取得 #wordpress
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
<?php | |
// /wp-content/debug.log にログを出力 | |
ob_start(); | |
print_r($prev); | |
$test = ob_get_contents(); | |
ob_end_clean(); | |
error_log('ログ: ' . $test); | |
// 検索正規表現 | |
// ^(\[.+?\{.+?) \{ |
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
<?php | |
// ... | |
// define('WP_DEBUG', false); | |
define('WP_DEBUG', true); | |
define('WP_DEBUG_DISPLAY', false); | |
define('WP_DEBUG_LOG', true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment