Open kminek opened 1 year ago
Good idea. Do you have time to implement it?
Sure here it is: https://github.com/samdark/yii2-psr-log-target/pull/35
This change breaks classes that extend PsrTarget
and override the setLogger
method, please revert!
https://github.com/craftcms/cms/blob/88a80e76493b3b4ef53512bb34742c116dda191c/src/log/MonologTarget.php#L114-L117
Owww. Sorry. Removed both tag and commit.
@kminek we can still solve it but with keeping the interface.
@samdark second attempt: https://github.com/samdark/yii2-psr-log-target/pull/36
Owww. Sorry. Removed both tag and commit.
Thanks!
currently you need to pass monolog logger instance inside config file. this is unfortunate as logger is created for each request even in situations where nothing is logged. also you cannot use Yii aliases to configure monolog handlers.