From 2e7a056bccfbfb2a0f8170d90cd4e688aad6b84e Mon Sep 17 00:00:00 2001 From: Paul Klimov Date: Thu, 20 Jul 2023 11:23:26 +0300 Subject: [PATCH] update docs --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 82265a3..caa42e8 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,8 @@ use Psr\log\LogLevel; Yii::log('psr message', LogLevel::INFO, 'psr-category'); // same as `Yii::log('psr message', CLogger::LEVEL_INFO, 'psr-category');` +Yii::log('context message', LogLevel::INFO, ['category' => 'context-category']); // same as `Yii::log('context message', CLogger::LEVEL_INFO, 'context-category');` + Yii::log('context message', LogLevel::INFO, [ 'foo' => 'bar', // specifying log context, which will be passed to the related PSR logged, and added as JSON to the Yii log message, if it is enabled ]);