即使WP_DEBUG = true,Wordpress也不会写入debug.log

时间:2018-09-13 06:07:34

标签: php wordpress

我正在开发一个简单的插件,需要在代码中使用error_log()函数查看日志。

我已将调试模式添加到我的wp-config.php文件中,如下所示:

    // Enable WP_DEBUG mode
define('WP_DEBUG', true);

// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);

// Disable display of errors and warnings 
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

// Use dev versions of core JS and CSS files (only needed if you are 
modifying these core files)
define('SCRIPT_DEBUG', true);

/* That's all, stop editing! Happy blogging. */

我正在将此wp_config.php内容用于两个不同的WP实例(预生产和生产)中,不幸的是,它仅在预生产服务器中起作用...我不知道为什么它在我的生产服务器中不可见完全一样...

我还检查了文件权限,并且也有相同的内容...

知道为什么我无法在第二台服务器上看到我的插件日志吗?

0 个答案:

没有答案