elementareteilchen/logmodifier

TYPO3 log processors for request URLs and compact exception output.

Maintainers

Package info

github.com/ElementareTeilchen/logmodifier

Type:typo3-cms-extension

pkg:composer/elementareteilchen/logmodifier

Statistics

Installs: 25

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-05-21 12:23 UTC

This package is auto-updated.

Last update: 2026-05-26 16:43:37 UTC


README

This extension provides TYPO3 log processors that make production logs easier to read while preserving access to full exception context when needed.

Features

  • Adds the current request URL to human-readable log messages.
  • Compacts exception context into a short file:line suffix.
  • Keeps full exception context when the configured environment variable is enabled.
  • Registers itself automatically through TYPO3 extension loading.

Installation

Install the extension with Composer:

composer require elementareteilchen/logmodifier

What Gets Registered

The extension registers two TYPO3 log processors for LogLevel::DEBUG in ext_localconf.php:

$GLOBALS['TYPO3_CONF_VARS']['LOG']['processorConfiguration'][LogLevel::DEBUG][RequestUrlProcessor::class] = [];
$GLOBALS['TYPO3_CONF_VARS']['LOG']['processorConfiguration'][LogLevel::DEBUG][CompactExceptionProcessor::class] = [
    'fullLogEnvVar' => 'TYPO3_FULL_LOG',
];

TYPO3 applies processors registered on DEBUG to records at that level and above, so the processors run for the regular TYPO3 log levels.

Request URL Processor

RequestUrlProcessor appends the normalized request URL to the log message:

Something failed (URL: https://example.test/path?foo=bar)

It reads the PSR-7 request from $GLOBALS['TYPO3_REQUEST'] when available and falls back to $_SERVER.

Compact Exception Processor

CompactExceptionProcessor removes the full throwable from the log context and appends the exception source location to the message:

Something failed - in file /path/to/File.php:42

This keeps log output short and avoids dumping large stack traces into compact log targets.

Full Exception Logging

Set the environment variable configured by fullLogEnvVar to a truthy value to keep the original exception context:

TYPO3_FULL_LOG=true

By default, the extension uses TYPO3_FULL_LOG.

License

GPL-2.0-or-later