Search by

psvneo / t3-extension-log-viewer

psvneo

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

Statistics

Installs: 144

Dependents: 0

Suggesters: 0

2.2.1 2026-10-13 09:50 UTC

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)

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_client is 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.

ParameterRequiredDefaultDescription
keyYes–API key of the Zabbix client.
logFileNameYes–Name of the log file to read the entries from.
maxNo50Maximum number of returned entries.
levelsNoallComma-separated log levels, e.g. error,critical.
manualDateStartNo–Start of the time range as Unix timestamp (int).
manualDateStopNo–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

  • key and logFileName must always be provided.
  • Multiple levels are separated by a comma without spaces: error,critical.
  • manualDateStart and manualDateStop expect Unix timestamps (seconds).

Important Notes

Caution: Deleting log files should be done with care