psvneo / t3-extension-log-viewer
This extension displays the logs in the Typo3 backend.
Package info
git.riconnect.de/riconet-public/typo3/psvneo_log_viewer.git
Type:typo3-cms-extension
pkg:composer/psvneo/t3-extension-log-viewer
Requires
- php: ^8.2
- typo3/cms-backend: ^14.3
- typo3/cms-core: ^14.3
- typo3/cms-extbase: ^14.3
- typo3/cms-fluid: ^14.3
- typo3/cms-frontend: ^14.3
Requires (Dev)
- psvneo/qa-toolset-t3: ^5.0
- wapplersystems/zabbix_client: ^14.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This extension displays the logs in the Typo3 backend.
TYPO3 Version
14.3
License
GPL-3.0-or-later
Documentation
Overview
This extension enables the display and management of log files in the var/log
directory. It allows authorized users to filter, view, and optionally delete
log files. Optionally, the latest log entries can be fetched by Zabbix via the
zabbix_client extension.
Installation & Integration
After installation, the extension can be configured in the backend.
Configuration
The main settings can be found at:
Admin Tools > Settings > Extension Configuration
Here you can enable or disable the Delete button.
- Default: The Delete button is disabled
- Enable: Allows direct deletion of log files from the module
Access Rights
Access to the backend module is restricted:
- Only Maintainers have access
Features
1. Log File Display
The extension lists all log files from the directory.
2. Filter Function
The integrated filter function allows users to:
- Search specifically for certain log files
- View individual log files with their entries
3. Delete Log Files
- Deletion is only possible if the Delete button is enabled
- Without activation, this function is unavailable
4. Zabbix Monitoring Integration (optional)
- Fetch the latest log entries of a log file via POST request
- Requires
wapplersystems/zabbix_client(see Zabbix Monitoring Integration)
Zabbix Monitoring Integration
The LogViewer can optionally be connected to Zabbix. It uses the
wapplersystems/zabbix_client
extension for this. A POST request fetches the latest log entries of a specific
log file.
Note: The Zabbix integration is optional. Without zabbix_client, the
LogViewer works as usual.
Requirements
wapplersystems/zabbix_clientis installed and configured in the project- An API key is set up for the Zabbix client
composer require wapplersystems/zabbix_client
Endpoint
POST https://<domain>/zabbixclient/?operation=LogFile
The operation LogFile is part of the URL and fetches the latest log entries.
Request
The request is a POST request with the content type
application/x-www-form-urlencoded. All parameters are sent in the
request body.
| Parameter | Required | Default | Description |
|---|---|---|---|
key | Yes | – | API key of the Zabbix client. |
logFileName | Yes | – | Name of the log file to read the entries from. |
max | No | 50 | Maximum number of returned entries. |
levels | No | all | Comma-separated log levels, e.g. error,critical. |
manualDateStart | No | – | Start of the time range as Unix timestamp (int). |
manualDateStop | No | – | End of the time range as Unix timestamp (int). |
Example
curl --location 'http://localhost/zabbixclient/?operation=LogFile' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'key=<API-KEY>' \
--data-urlencode 'logFileName=typo3_example.log' \
--data-urlencode 'max=10' \
--data-urlencode 'levels=error,critical' \
--data-urlencode 'manualDateStart=1759300000' \
--data-urlencode 'manualDateStop=1759386400'
Response
Success:
{
"status": true,
"value": {
"message": "1 Messages",
"logs": [
{
"datetime": "2025-10-01 09:15:32",
"level": "error",
"component": "TYPO3.CMS.Core.Error.ErrorHandler",
"message": "Core: Error handler (FE): PHP Warning: Undefined variable $foo"
}
]
}
}
Failure (e.g. invalid log file name, missing or invalid parameters):
{
"status": false,
"value": "Invalid log file name"
}
If status is false, value contains the error message.
Notes
keyandlogFileNamemust always be provided.- Multiple
levelsare separated by a comma without spaces:error,critical. manualDateStartandmanualDateStopexpect Unix timestamps (seconds).
Important Notes
Caution: Deleting log files should be done with care