前言介紹
- 這款 WordPress 外掛「WP Log Action」是 2016-10-03 上架。
- 目前有 60 個安裝啟用數。
- 上一次更新是 2024-12-06,距離現在已有 149 天。
- 外掛最低要求 WordPress 5.3 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
log | debug | warning | activity | developer tool |
內容簡介
這個外掛程式與大部分外掛不同之處在於它使用了反向 hook。您可以在希望進行紀錄的位置加入 do_action,此外掛程式只會在啟用時將它們存到資料庫內。
日誌紀錄
這個外掛現在可以紀錄插件的活動 (已啟用、已停用、已刪除、已更新、已安裝),WordPress 更新時以及錯誤使用或時代已逝的函數被使用時的情況。
範例:
do_action( 'wp_log_info', '目前沒問題', '詳細紀錄的內容' );
if ( $something_bad_happened ) {
do_action( 'wp_log_error', '出問題啦!', '問題的詳細說明' );
...
}
您可以到後台中的「工具」>「日誌」查看、刪除和匯出日誌。只有擁有「manage_options」能力的使用者才能夠存取。
這個外掛會自動紀錄時代已逝的錯誤和未來即將淘汰的錯誤,而其餘就由您加入到程式碼中囉。
您可以紀錄決定特定活動或篩選器執行哪些函數。例如,若您想知道「init」鉤子執行的內容:
function check_init_hook() {
do_action( 'wp_log_debug_hook', 'init' );
}
add_filter( 'init', 'check_init_hook', 0 );
以下是您可以在程式碼中加入的不同層級的紀錄。您可以依自己的需求選擇使用任何層級,每個層級的說明只是指示。
緊急
系統無法使用
do_action( 'wp_log_emergency', $label, $message );
警示
必須立即採取行動。
do_action( 'wp_log_alert', $label, $message );
危急狀況
危急狀況。
do_action( 'wp_log_critical', $label, $message );
錯誤
不需要立即採取行動的執行階段錯誤,但通常應進行紀錄和監控。
do_action( 'wp_log_error', $label, $message );
警告
非錯誤的異常事件。
do_action( 'wp_log_warning', $label, $message );
注意事項
正常但重要的事件。
do_action( 'wp_log_notice', $label, $message );
資訊
有趣的事件。
do_action( 'wp_log_info', $label, $message );
除錯
詳細的除錯資訊。
do_action( 'wp_log_debug', $label, $message );
原文外掛簡介
This plugin uses hooks in the opposite way most plugins do. You add do_action where you want to do some logging and this plugin will save it to the database only when active.
Log Activity
This plugin now logs plugin activity (when activated, deactivated, deleted, updated, installed), when wordpress is updated, and when functions are used wrong or deprecated.
Example:
do_action( 'wp_log_info', 'So far ok', 'Details of what is ok.' );
if ( $something_bad_happened ) {
do_action( 'wp_log_error', 'This Happened!', 'Details of what happened.' );
...
}
See Tools->Logs to view, delete, and export the logs on the admin side. Only users with the manage_options capability will have access.
This plugin automatically logs deprecated and doing_it_wrong errors. The rest is what you add to your code.
You can log what functions will be run for a specific action or filter. For example if you want to see what runs in the ‘init’ hook:
function check_init_hook() {
do_action( 'wp_log_debug_hook', 'init' );
}
add_filter( 'init', 'check_init_hook', 0 );
The following are the different levels of logging to add to your code. You can use any level how you see fit, the descriptions of each level are just guidelines.
Emergency
System is unusable
do_action( ‘wp_log_emergency’, $label, $message );
Alert
Action must be taken immediately.
do_action( ‘wp_log_alert’, $label, $message );
Critical
Critical conditions.
do_action( ‘wp_log_critical’, $label, $message );
Error
Runtime errors that do not require immediate action but should typically be logged and monitored.
do_action( ‘wp_log_error’, $label, $message );
Warning
Exceptional occurrences that are not errors.
do_action( ‘wp_log_warning’, $label, $message );
Notice
Normal but significant events.
do_action( ‘wp_log_notice’, $label, $message );
Info
Interesting events.
do_action( ‘wp_log_info’, $label, $message );
Debug
Detailed debug information.
do_action( ‘wp_log_debug’, $label, $message );
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP Log Action」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1 | 0.2 | 0.3 | 0.4 | 0.21 | 0.22 | 0.31 | 0.32 | 0.33 | 0.34 | 0.40 | 0.50 | 0.51 | 0.52 | 0.53 | trunk |
延伸相關外掛(你可能也想知道)
Simple History – Track, Log, and Audit WordPress Changes 》Simple History 是一個 WordPress 外掛程式,可直接在控制台或另一個頁面上顯示 WordPress 中最近的更改。此外控制台提供了一個 日誌/歷史記錄/審計日誌/...。
Stream 》Stream 是一個 WordPress 外掛程式,可以透過即時通知和第三方整合,主動警示您當 WordPress 網站發生問題時。, 這個外掛程式設計用來進行除錯和遵守法規,適...。
BuddyPress Global Search 》讓您的 BuddyPress 成員能夠透過統一的搜尋欄,搜尋每個 BuddyPress 組件,包括您選擇的頁面、文章和自訂文章類型,並立即獲得下拉式的即時結果。, 只需啟用...。
WP-Strava 》本外掛使用 Strava API 在您的 WordPress 網站上嵌入運動員的地圖和活動。包括數個小工具和簡碼,可顯示地圖和活動摘要。, , 區塊:, , 在 WordPress 5.0 及...。
WP Log Viewer 》WP Log Viewer 可以輕鬆且無壓力地偵錯你的 WordPress 網站。, 功能, 這個外掛的一些功能。, , 管理列小工具, 點擊即可切換偵錯, 智慧下載, 一鍵錯誤篩選, 一...。
MC4WP: Mailchimp Activity 》此外掛可以在您的 WordPress 儀表板中顯示 Mailchimp 清單的活動情況。, Mailchimp 清單活動, 啟用後,它會顯示一個新的儀表板小工具,其中包含條形圖或折線...。
BuddyPress Group Email Subscription 》這個強大的外掛程式允許使用者收到團體活動的電子郵件通知。每週或每日摘要皆可選擇。每位使用者都可以選擇如何訂閱他們的團體。, 請注意,此外掛需要 BuddyP...。
BuddyPress Edit Activity 》讓您的 BuddyPress 成員在網站前端編輯他們的活動文章和回覆。您甚至可以設定一個時間限制,決定活動文章可以編輯的時間長度。, 只需啟用此外掛,每個活動文...。
Wbcom Designs – BuddyPress Activity Social Share 》「BuddyPress 活動社交分享」可以讓使用者分享活動至他們的社交網路上。這是一款完美的外掛,使得您的網站上的使用者活動更加社交化,同時可以大大增加會員的...。
Track, Analyze & Optimize by WP Tao 》這是一個對網路創業家而言必不可少的、排名第一的 WordPress 擴充功能!, WP Tao 是一款簡單卻強大的 WordPress 追蹤擴充功能,可以識別網站訪客並追蹤其活動...。
Wbcom Designs – Shortcodes & Elementor Widgets For BuddyPress 》這個外掛程式會為 BuddyPress 新增擴充功能。它會在網站的任何文章/頁面上使用簡碼 (Shortcode) 來列出活動動態串流、會員名單和群組名單。, 隨著我們目前的...。
Counter-Hits 》這是一個簡單、易用、快速、適應性強、本地化且客觀的訪問網站計數器。, 它不會向其他伺服器發出任何額外的請求,這意味著它消耗的資源極少。, 顯示任何頁面...。
History Log by click5 》這是一款最佳 WordPress 插件,可用於追蹤用戶活動並記錄網站上所做的更改。, 詳細記錄網站 WordPress 儀表板中發生的重要事件。在排除可能出現的錯誤時,這...。
Plainview Activity Monitor 》Activity Monitor 追蹤您的部落格或網路中所有使用者的活動。您可以在全域資料表中查看整個網路中的活動,或者僅在您目前檢視的部落格中本地檢視這些活動。您...。
WP User Activity 》WP User Activity 是 WordPress 中記錄活動的最佳途徑。活動可以按照使用者進行排序、過濾和檢視,使用者登錄的會話數據以及其他使用者的 IP 地址和用戶代理...。