elementareteilchen/logmodifier 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elementareteilchen/logmodifier

Composer 安装命令:

composer require elementareteilchen/logmodifier

包简介

TYPO3 log processors for request URLs and compact exception output.

README 文档

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

统计信息

  • 总下载量: 73
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-05-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固