| 开发者 | sonu8755 |
|---|---|
| 更新时间 | 2026年7月28日 00:42 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
WP_DEBUG_DISPLAY is off. When you have chosen not to display errors, Logtern re-asserts that choice — the errors still land in the log, they just stop being painted onto your site.wp-content/debug.log.tail -f in a terminal (1–30 second polling, your choice). Polling is lightweight: nothing is re-read unless the file actually changed, and it pauses automatically while the tab is hidden.WP_DEBUG and WP_DEBUG_LOG on or off without hand-editing wp-config.php. When enabling, WP_DEBUG_DISPLAY is forced off so errors are logged instead of shown to visitors. Constants are located with PHP's tokenizer (commented-out defines are never touched), every change is re-verified before saving, and the file is replaced atomically with its permissions preserved — a failed write can never leave a broken wp-config.php behind..txt file.manage_options), and to network administrators on multisite.wp-content/debug.log whenever possible: the log goes to a randomly named file in a directory protected by .htaccess/web.config deny rules that the plugin creates. (Only if the uploads directory is not writable does the toggle fall back to the WordPress default location.)logtern folder to /wp-content/plugins/, or install it via Plugins → Add New.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.
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.
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.
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.
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.
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.
No. There is no tracking, no external requests, and no data leaves your server.