Make Logger PSR-3 compatible so it will be easy to change logging library to another one.
Typical use case: if I want to start logging to Chrome Console, I don't have to write my own implementation of this based on Yii logger, but simply switch logging system to Monolog.
PSR-3: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
Monolog: https://github.com/Seldaek/monolog
Simliar to #1660
From what I understood, @qiangxue doesn't want to make it compatible because of 2 reasons:
From my point of view:
context
array during delivering the message from Yii
to logger componentYii::trace()
, Yii::error()
, Yii::warning()
, Yii::info()
. There's no need to add such shortcuts for all the levels.Yii is now part of PHP-FIG project. So why it doesn't care about it's standards?
We do care about standards that make sense for the framework such as phpdoc, new autoloader standard etc. All the interface standards are a bit too much: not giving much benefit but reducing code usability when used with a single framework.