Browse Source

Fix #17485: Revert "Fix #17469: Fixed updating `Yii` logger instance when setting new logger via configuration"

This reverts commit 46136b09e7.
tags/2.0.25
Alexander Makarov 5 years ago
parent
commit
14a7198434
No known key found for this signature in database
GPG Key ID: 3617B79C6A325E4A
  1. 1
      framework/log/Dispatcher.php
  2. 10
      tests/framework/log/DispatcherTest.php

1
framework/log/Dispatcher.php

@ -131,7 +131,6 @@ class Dispatcher extends Component
}
$this->_logger = $value;
$this->_logger->dispatcher = $this;
Yii::setLogger($this->_logger);
}
/**

10
tests/framework/log/DispatcherTest.php

@ -88,16 +88,6 @@ namespace yiiunit\framework\log {
$this->assertEquals(42, $dispatcher->getLogger()->traceLevel);
}
public function testSetNewLoggerUpdatesGlobalLogger()
{
$dispatcher = new Dispatcher();
$this->assertSame(Yii::getLogger(), $dispatcher->getLogger());
$newLogger = new Logger();
$dispatcher->setLogger($newLogger);
$this->assertSame(Yii::getLogger(), $dispatcher->getLogger());
}
/**
* @covers \yii\log\Dispatcher::setLogger()
*/

Loading…
Cancel
Save