framework/log/Dispatcher.php
public function setLogger($value)
    {
        if (is_string($value) || is_array($value)) {
            $value = Yii::createObject($value);
        }
        $this->_logger = $value;
        $this->_logger->dispatcher = $this;
    }
public function setLogger($value)
    {
        if (is_string($value) || is_array($value)) {
            $value = Yii::createObject($value);
        }
        $this->_logger = $value;
        $this->_logger->dispatcher = $this;
    }
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()]].