這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Debug Log

描述

If the log is long, the latest lines are show at the top to avoid scrolling. Line numbers are shown for reference.

Logs over 5MB do not load until you confirm you are sure, or you can opt to delete the log and start afresh.

Only admins can view (or anyone you give the capability “manage_options”).

Debug Log only works if it’s enabled in wp-config.php. See https://codex.wordpress.org/Debugging_in_WordPress#WP_DEBUG_LOG

Recommended configuration:

define( 'WP_DEBUG', true );// just toggle this line to false to turn off
if ( WP_DEBUG ) {
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );
}

螢幕截圖

  • Basic Screenshot
  • Warning before loading big files.

安裝

  1. Install as you would any plugin.

常見問題

How do I change the number lines in Latest Errors?

add_filter( ‘debug_log_latest_count’, function(){ return 20; } );

How do I turn Latest Errors off?

Same as above but use 0… or be fancy:
add_filter( ‘debug_log_latest_count’, ‘__return_false’ );

How do I change or turn off the file size check?

Same deal. The number here is megabytes.

add_filter( 'debug_log_too_big', function(){ return 2; } );

add_filter( 'debug_log_too_big', '__return_false' );

評價

閱讀全部1個評價

貢獻者及開發者

“Debug Log” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Debug Log 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

0.3

  • Float delete button for easier access

0.2

  • Added “Recent Errors” functionality
  • Added snippet to paste in wp-config when debug is off

0.1

  • Initial Release