|
|
|
@ -10,7 +10,6 @@ namespace yii\log;
|
|
|
|
|
use Yii; |
|
|
|
|
use yii\base\Component; |
|
|
|
|
use yii\base\ErrorHandler; |
|
|
|
|
use yii\base\InvalidConfigException; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Dispatcher manages a set of [[Target|log targets]]. |
|
|
|
@ -107,8 +106,8 @@ class Dispatcher extends Component
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Gets the connected logger. |
|
|
|
|
* If not set, [[\Yii::getLogger()]] will be used. |
|
|
|
|
* @property Logger the logger. If not set, [[\Yii::getLogger()]] will be used. |
|
|
|
|
* If not set, [[Yii::getLogger()]] will be used. |
|
|
|
|
* @property Logger the logger. If not set, [[Yii::getLogger()]] will be used. |
|
|
|
|
* @return Logger the logger. |
|
|
|
|
*/ |
|
|
|
|
public function getLogger() |
|
|
|
@ -124,7 +123,8 @@ class Dispatcher extends Component
|
|
|
|
|
* Sets the connected logger. |
|
|
|
|
* @param Logger|string|array $value the logger to be used. This can either be a logger instance |
|
|
|
|
* or a configuration that will be used to create one using [[Yii::createObject()]]. |
|
|
|
|
* @throws InvalidConfigException |
|
|
|
|
* If you are providing custom logger configuration and would like it to be used for the whole application |
|
|
|
|
* and not just for the dispatcher you should use [[Yii::setLogger()]] instead. |
|
|
|
|
*/ |
|
|
|
|
public function setLogger($value) |
|
|
|
|
{ |
|
|
|
@ -133,7 +133,6 @@ class Dispatcher extends Component
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$this->_logger = $value; |
|
|
|
|
Yii::setLogger($value); |
|
|
|
|
$this->_logger->dispatcher = $this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|