---
title: "Feature: #95044 - Support autowired LoggerInterface injection"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-95044"
source: "Changelog/11.4/Feature-95044-SupportAutowiredLoggerInterfaceInjection.rst"
modified: "2026-09-15T10:46:36+00:00"
---

# Feature: #95044 - Support autowired LoggerInterface injection

See [forge#95044](https://forge.typo3.org/issues/95044)

## Description

Logger instances may be required to be available during object
construction, LoggerAwareInterface isn't an option in that case.
Therefore `\Psr\Log\LoggerInterface` as constructor argument
is now autowired (if the service is configured to use autowiring)
and instantiated with an object-specific logger.

## Impact

Services are no longer required to use
`\Psr\Log\LoggerAwareInterface` and `\Psr\Log\LoggerAwareTrait`,
but can add a constructor argument `\Psr\Log\LoggerInterface` instead.

Example:

```php
use Psr\Log\LoggerInterface;

class MyClass {
    private LoggerInterface $logger;

    public function __construct(LoggerInterface $logger) {
        $this->logger = $logger;
    }
}
```
