Title: WP Logger
Author: iTRON
Published: <strong>2018 年 9 月 2 日</strong>
Last modified: 2025 年 12 月 1 日

---

搜索插件

![](https://ps.w.org/wp-data-logger/assets/icon-128x128.png?rev=1934745)

# WP Logger

 作者：[iTRON](https://profiles.wordpress.org/hokku/)

[下载](https://downloads.wordpress.org/plugin/wp-data-logger.2.4.zip)

 * [详情](https://cn.wordpress.org/plugins/wp-data-logger/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-data-logger/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wp-data-logger/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wp-data-logger/#developers)

 [支持](https://wordpress.org/support/plugin/wp-data-logger/)

## 描述

 1. Insert the hook `do_action( 'logger', $data );` in your code
 2. Go to **Tools > WP Logger**

#### Additional buttons

Use the `wpdl_add_button( string $name, callable $clb, string $btnClass = '' )` 
function to add a button to the logger page.

 * **$name** text for the button;
 * **$clb** callback function;
 * **$btnClass** class for the button (optional).

Click on the button to execute the function via WP-AJAX. If an Exception or Error
occurs, it will be logged as well.

#### Hooks:

 * wp_logger_button_panel
 * wp_logger_inline_css
 * wp_logger_inline_js
 * wp_data_logger_print_data

#### Available constants:

 * WPDL_DISPLAY_LIMIT

[GitHub](https://github.com/hokoo/logger-u7)

## 屏幕截图

 * [[
 * Logger page

## 安装

 1. Upload the plugin to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the **Plugins** menu in WordPress.
 3. Insert the hook `do_action( 'logger', $data );` in your code.
 4. Go to **Tools > WP Logger**.

## 评价

![](https://secure.gravatar.com/avatar/6fac1312c87d9c19f910a166d6796c62ed92f154a742ba3f99831f56a11a157c?
s=60&d=retro&r=g)

### 󠀁[Great Logging Tool](https://wordpress.org/support/topic/great-logging-tool/)󠁿

 [tezalsec](https://profiles.wordpress.org/tezalsec/) 2025 年 4 月 23 日

Thanks for picking it up again!

![](https://secure.gravatar.com/avatar/d76f057311cfadf5ffa3fa47990365cf1dd6442b77d22b75dd4c50c903df90b7?
s=60&d=retro&r=g)

### 󠀁[Greate plugin, spot on](https://wordpress.org/support/topic/greate-plugin-spot-on/)󠁿

 [guyeshet](https://profiles.wordpress.org/guyeshet/) 2021 年 2 月 10 日

Thanks, guys, exactly what I needed, and it works great!

![](https://secure.gravatar.com/avatar/7722ce63504959e752c22ebb8201177f5fec15dfada009811c69c7afabfff9da?
s=60&d=retro&r=g)

### 󠀁[Log for developers](https://wordpress.org/support/topic/log-for-developers/)󠁿

 [Dima Minka](https://profiles.wordpress.org/cdk-comp/) 2018 年 9 月 4 日

Thx for this plugin, the logging very important for us, and we happy to use your
plugin with our team.

 [ 阅读所有3条评价 ](https://wordpress.org/support/plugin/wp-data-logger/reviews/)

## 贡献者及开发者

「WP Logger」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ iTRON ](https://profiles.wordpress.org/hokku/)
 *   [ wpcraft ](https://profiles.wordpress.org/casepress/)

[帮助将「WP Logger」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-data-logger)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-data-logger/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/wp-data-logger/)，或通过[RSS](https://plugins.trac.wordpress.org/log/wp-data-logger/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-data-logger/)。

## 更新日志

#### 2.4

 * Fix Uncaught Exception: Serialization of ‘Closure’ is not allowed when creating
   button with closure callback.

#### 2.3

 * Custom button adding function introduced.
 * PHP min version changed to 7.1.

#### 2.2.1

 * Nonce verification for ajax queries.
 * PayPal link updated.
 * Plugin tags updated.

#### 2.2

 * Clear log vulnerability fixed.

#### 2.1

 * The output of the data got escaped.

#### 2.0.2

 * Suppress DB errors while the data insert

#### 2.0.1

 * bug fixed

#### 2.0

 * Logged data was moved to custom table in DB
 * WPDL_DISPLAY_LIMIT
 * Hidding/showing rows

#### 1.4

 * Added types of data

#### 1.2

 * Init commit

## 额外信息

 *  版本 **2.4**
 *  最后更新：**4 月前**
 *  活跃安装数量 **300+**
 *  WordPress 版本 ** 3.5 或更高版本 **
 *  已测试的最高版本为 **6.8.5**
 *  PHP 版本 ** 7.1 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-data-logger/)
 * 标签
 * [data](https://cn.wordpress.org/plugins/tags/data/)[debug](https://cn.wordpress.org/plugins/tags/debug/)
   [develop](https://cn.wordpress.org/plugins/tags/develop/)[log](https://cn.wordpress.org/plugins/tags/log/)
   [logger](https://cn.wordpress.org/plugins/tags/logger/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-data-logger/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  3 条 5 星评价     ](https://wordpress.org/support/plugin/wp-data-logger/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/wp-data-logger/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/wp-data-logger/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/wp-data-logger/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/wp-data-logger/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-data-logger/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-data-logger/reviews/)

## 贡献者

 *   [ iTRON ](https://profiles.wordpress.org/hokku/)
 *   [ wpcraft ](https://profiles.wordpress.org/casepress/)

## 支持

最近两个月解决的问题：

     总计 1，已解决 1

 [查看支持论坛](https://wordpress.org/support/plugin/wp-data-logger/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.me/igortron)