A PSR LoggerInterface implementation that routes to the Yii logger

Fund package maintenance!
Open Collective

Installs: 8 328

Dependents: 0

Suggesters: 1

Security: 0

Stars: 7

Watchers: 12

Forks: 2

Open Issues: 1


v1.0.0 2022-10-04 08:34 UTC

This package is auto-updated.

Last update: 2024-05-20 10:41:06 UTC


This simple library implements a PSR compatible logger that routes all messages to a Yii Logger. Use this if you have a library that needs such a logger and you want to forward the messages to your existing Logger.

Logger adapter

The Logger adapter class takes a Yii Logger object and implements the LoggerInterface.


Since Yii2 uses mutability a lot, the Logger adapter might hold a reference to an old Yii Logger. To work properly with the Service Locator pattern we must use it on every call. DynamicLogger does this while internally using the Logger and recreating it when needed.