yii\log\Dispatcher::setLogger PHP Method

setLogger() public method

Sets the connected logger.
public setLogger ( Logger | string | array $value )
$value Logger | string | array 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()]].
    public function setLogger($value)
    {
        if (is_string($value) || is_array($value)) {
            $value = Yii::createObject($value);
        }
        $this->_logger = $value;
        $this->_logger->dispatcher = $this;
    }