Linux 软件免费装
Banner图

Logtern – Debug Log Viewer

开发者 sonu8755
更新时间 2026年7月28日 00:42
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

debug log developer error-log debug-log

下载

1.0.0

详情介绍:

Logtern gives developers and site administrators a fast, safe way to work with the WordPress debug log without ever leaving the admin dashboard. Why Logtern? Log viewers are a common plugin category — Logtern was built because the existing options kept falling short on the sites that need one most: Features Security

安装:

  1. Upload the logtern folder to /wp-content/plugins/, or install it via Plugins → Add New.
  2. Activate the plugin through the Plugins screen.
  3. Go to Tools → Logtern.
  4. If debug logging is off, flip the Debug Logging switch to start capturing errors.

屏幕截图:

  • Grouped view — repeated errors collapsed with occurrence counts.
  • The debug logging switch with per-constant status pills.

升级注意事项:

1.0.0 Initial release.

常见问题:

Where does WordPress store the debug log?

By default in wp-content/debug.log, once WP_DEBUG and WP_DEBUG_LOG are enabled. Because that default path is publicly guessable, Logtern's toggle instead points the log at a randomly named file under uploads/logtern/, protected from direct HTTP access. If you already define WP_DEBUG_LOG as a custom file path, Logtern reads and manages that file instead and the toggle preserves your custom path. The exact file currently in use is always shown in the Log File card on the dashboard, next to a Copy button.

Who can see the log?

Only users with the manage_options capability (administrators). On multisite, only network administrators. Debug logs can contain sensitive information, so the capability is also filterable via logtern_capability if you need to restrict it further.

Does Logtern edit wp-config.php?

Only when you use the debug toggle, and only the WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY constants. Defines are located with PHP's tokenizer, so commented-out lines are never mistaken for real ones; the result is re-verified before saving, and the file is swapped in atomically with its permissions preserved. If anything looks unsafe, the plugin refuses to write and tells you. If wp-config.php is not writable, the toggle is disabled and everything else keeps working.

Will it work with very large log files?

Yes. Logtern never loads the whole file: it seeks to the end and reads only the last lines you asked for, and downloads are streamed in chunks.

Is my debug log publicly accessible?

Not when you enable logging through Logtern: the file gets an unguessable random name inside a directory protected by .htaccess and web.config deny rules that the plugin creates. A pre-existing wp-content/debug.log from before you installed Logtern may still be reachable on some servers, though — download what you need, clear it, and let Logtern's toggle set up the protected location. Disabling debug logging when you are done is good practice either way.

What happens when I uninstall the plugin?

Logtern cleans up after itself completely: the debug constants it manages in wp-config.php are reverted (WP_DEBUG is turned off; a WP_DEBUG_LOG value pointing at the plugin's protected directory is reset to the WordPress default, while custom paths are left untouched), the uploads/logtern/ directory — including its log files — is deleted, and the plugin's per-user settings are removed. Download any log you want to keep before uninstalling.

Does the plugin collect any data?

No. There is no tracking, no external requests, and no data leaves your server.

更新日志:

1.0.0