diff --git a/docs/guide/logging.md b/docs/guide/logging.md index 08175b8..8df457e 100644 --- a/docs/guide/logging.md +++ b/docs/guide/logging.md @@ -51,7 +51,10 @@ You may configure the targets in application configuration, like the following: 'email' => [ 'class' => 'yii\log\EmailTarget', 'levels' => ['error', 'warning'], - 'emails' => ['admin@example.com'], + 'message' => [ + 'to' => ['admin@example.com', 'developer@example.com'], + 'subject' => 'New example.com log message', + ], ], ], ], @@ -59,9 +62,9 @@ You may configure the targets in application configuration, like the following: ] ``` -In the config above we are defining two log targets: file and email. In both cases we are filtering messages handles by -these targets by severity. In case of file target we're additionally filter by category. `yii\*` means all categories -starting with `yii\`. +In the config above we are defining two log targets: [[\yii\log\FileTarget|file]] and [[\yii\log\EmailTarget|email]]. +In both cases we are filtering messages handles by these targets by severity. In case of file target we're +additionally filter by category. `yii\*` means all categories starting with `yii\`. Each log target can have a name and can be referenced via the [[targets]] property as follows: diff --git a/framework/yii/log/Logger.php b/framework/yii/log/Logger.php index f79c40f..1629b9b 100644 --- a/framework/yii/log/Logger.php +++ b/framework/yii/log/Logger.php @@ -43,7 +43,9 @@ use yii\base\InvalidConfigException; * 'email' => [ * 'class' => 'yii\log\EmailTarget', * 'levels' => ['error', 'warning'], - * 'emails' => ['admin@example.com'], + * 'message' => [ + * 'to' => 'admin@example.com', + * ], * ], * ], * ], diff --git a/framework/yii/mail/MessageInterface.php b/framework/yii/mail/MessageInterface.php index d70d40f..94cfd18 100644 --- a/framework/yii/mail/MessageInterface.php +++ b/framework/yii/mail/MessageInterface.php @@ -13,7 +13,7 @@ namespace yii\mail; * A message represents the settings and content of an email, such as the sender, recipient, * subject, body, etc. * - * Messages are sent by a [[MailerInterface||mailer]], like the following, + * Messages are sent by a [[\yii\mail\MailerInterface|mailer]], like the following, * * ~~~ * Yii::$app->mail->compose()