Skip to content

razonyang/yii2-psr-log

Repository files navigation

Yii2 PSR Logger Adapter

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads LICENSE

Installation

composer require razonyang/yii2-psr-log

Usage

$categoryParam = '__CATEGORY__';

$logger = new \RazonYang\Yii2\Psr\Log\Logger($categoryParam);
$logger->error('hello {name}', [$categoryParam => __METHOD__, 'name' => 'foo']);
// equals to
Yii::error('hello foo', __METHOD__);