Download the PHP package yiisoft/log without Composer

On this page you can find all versions of the php package yiisoft/log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

Please rate this library. Is it a good library?

All versions of log with dependencies

Informations about the package log

Yii Logging Library

Latest Stable Version Total Downloads Build status Scrutinizer Code Quality Code Coverage Mutation testing badge static analysis type-coverage

This package provides PSR-3 compatible logging library. It is used in Yii Framework but is usable separately.

The logger sends passes messages to multiple targets. Each target may filter messages by their severity levels and categories and then export them to some medium such as file, email or syslog.


The package could be installed with composer:

General usage

Creating a logger:

Writing logs:

Message Flushing and Exporting

Log messages are collected and stored in memory. To limit memory consumption, the logger will flush the recorded messages to the log targets each time a certain number of log messages accumulate. You can customize this number by calling the \Yiisoft\Log\Logger::setFlushInterval() method:

Each log target also collects and stores messages in memory. Message exporting in a target follows the same principle as in the logger. To change the number of stored messages, call the \Yiisoft\Log\Target::setExportInterval() method:

Note: All message flushing and exporting also occurs when the application ends.

Logging targets

This package contains two targets:

Extra logging targets are implemented as separate packages:

See Yii guide to logging for more info.

Unit testing

The package is tested with PHPUnit. To run tests:

Mutation testing

The package tests are checked with Infection mutation framework. To run it:

Static analysis

The code is statically analyzed with Psalm. To run static analysis:

Support the project

Open Collective

Follow updates

Official website Twitter Telegram Facebook Slack


The Yii Logging Library is free software. It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Software.

Requires php Version ^7.4|^8.0
psr/log Version ^1.1
yiisoft/var-dumper Version ^1.0

The package yiisoft/log contains the following files

Loading the files please wait ....