Documentation · Admin Reference
Logs Reference
This document is a reference for the Logs screen of the ADP Car Market Hub plugin (Car Market Hub → Logs). It explains how to monitor recent errors and warnings, view the raw plugin log file and clear it when needed.
When to use this document
Read this if you need to:
- Check whether the plugin has logged any recent errors or warnings.
- Read the latest entries of the raw log file.
- Adjust how many lines are shown.
- Reset the log file (for example to start a clean trace before a support reproduction).
Overview
The plugin writes a single, append-only log file. The Logs screen surfaces it in three blocks:
- Recent Errors — most recent log entries containing the
[ERROR]level. - Recent Warnings — most recent log entries containing the
[WARNING]level. - Log Viewer — raw tail of the log file with a configurable number of lines.
The recent-errors and recent-warnings panels each show up to 50 of the most recent entries, scanned from the last 2,000 log lines for performance.
Requirements or prerequisites
- A user with the plugin's management capability.
- A writable log file path on the server. The current path is shown above the Log Viewer.
Step by step instructions
Inspect the log
- Open
Car Market Hub → Logs. - Use Recent Errors and Recent Warnings at the top to spot anything that needs attention.
- Scroll to Log Viewer to see the raw tail of the file.
Adjust how many lines are shown
- In the toolbar above the Log Viewer, change the Lines field. Allowed range is 100 to 2000 in steps of 50.
- Click Reload to re-read the file with the new line count.
Clear the log file
- Click Clear log file in the Log Viewer toolbar.
- Confirm the dialog. The log file is truncated to zero bytes.
- The plugin records that the log was cleared manually so that future entries are correlated to a known reset point.
Clearing the log is irreversible. Use this only when you intentionally want to start a clean trace.
Configuration reference
The Logs screen has no persistent settings. The Lines selector is a per-request query parameter only.
| Control | Range / values | Notes |
|---|---|---|
| Lines | Integer between 100 and 2000, step 50 | Controls how many tail lines the Log Viewer renders. |
| Reload | Button | Re-reads the log file with the chosen line count. |
| Clear log file | Destructive button | Truncates the log file to zero bytes. Visible only when the file exists. |
Operational notes
- The log file path is shown above the Log Viewer. Treat it as an internal location and avoid sharing it externally; refer to it only when debugging on your own server.
- If the log file does not exist yet, the screen shows a notice. The file is created automatically on the next log entry.
- The recent-error and recent-warning panels detect entries by the substrings
[ERROR]and[WARNING]respectively. Custom log writers using a different format will not be matched. - Log rotation, archival and disk-usage warnings are surfaced on the System And Help Reference screen.
- The viewer renders escaped text inside a
<pre>block. Click the area to select all contents for copying.
Troubleshooting
- "Could not clear log file (file not found or not writable)." The log file path is not writable by the web server user, or the file does not exist. Verify file system permissions on the path shown in the toolbar.
- Lines selector resets after navigating away. Expected. The line count is a per-request query parameter and is not stored as a setting.
- The log appears empty after a recent failure. Confirm the right log file is being viewed (path in the toolbar) and that the failing operation actually runs through the plugin's logger. Some PHP fatal errors are written to the WordPress
debug.loginstead — see System And Help Reference. - "Recent Errors" is empty even though something failed. Either the failure was logged at a different level (for example
[INFO]), or it occurred outside the last 2,000 lines scanned by the monitoring panels. Read the raw Log Viewer.