admin管理员组文章数量:1122832
This is more like of an inquiry.
So I enabled my WP_DEBUG_LOG to true.
It does work though, debug.log is in my wp-content's directory.
But does it also do log rotation like different file for each day?
Example:
Today's file - debug.log
Yesterday's - 2019-12-18-101010-debug.log
Does it work like this? Or just debug.log all through out?
This is more like of an inquiry.
So I enabled my WP_DEBUG_LOG to true.
It does work though, debug.log is in my wp-content's directory.
But does it also do log rotation like different file for each day?
Example:
Today's file - debug.log
Yesterday's - 2019-12-18-101010-debug.log
Does it work like this? Or just debug.log all through out?
Share Improve this question edited Dec 19, 2019 at 8:04 Krzysiek Dróżdż 25.5k9 gold badges53 silver badges74 bronze badges asked Dec 19, 2019 at 6:52 maryyyyyyymaryyyyyyy 536 bronze badges2 Answers
Reset to default 11No, it creates only one file. There is no log rotation involved.
But... Sometimes “but” can be a good thing ;)
WP uses error_log for its debug log, so you can change its location using:
ini_set( 'error_log', WP_CONTENT_DIR . '/debug-' . date('Y-m-d') . '.log' );
An other way is set it in wp-config.php
:
define( 'WP_DEBUG_LOG', (defined( 'WP_CONTENT_DIR' ) ? WP_CONTENT_DIR : __DIR__ . '/wp-content') . '/debug-' . date('Y-m-d') . '.log' );
本文标签: phpDoes the debuglog do log rotation
版权声明:本文标题:php - Does the debug.log do log rotation? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736305899a1932756.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论