|
|
@ -28,16 +28,16 @@ use yii\base\Application; |
|
|
|
* 'preload' => array('log'), |
|
|
|
* 'preload' => array('log'), |
|
|
|
* 'components' => array( |
|
|
|
* 'components' => array( |
|
|
|
* 'log' => array( |
|
|
|
* 'log' => array( |
|
|
|
* 'class' => '\yii\logging\Router', |
|
|
|
* 'class' => 'yii\logging\Router', |
|
|
|
* 'targets' => array( |
|
|
|
* 'targets' => array( |
|
|
|
* 'file' => array( |
|
|
|
* 'file' => array( |
|
|
|
* 'class' => '\yii\logging\FileTarget', |
|
|
|
* 'class' => 'yii\logging\FileTarget', |
|
|
|
* 'levels' => 'trace, info', |
|
|
|
* 'levels' => array('trace', 'info'), |
|
|
|
* 'categories' => 'yii\*', |
|
|
|
* 'categories' => array('yii\*'), |
|
|
|
* ), |
|
|
|
* ), |
|
|
|
* 'email' => array( |
|
|
|
* 'email' => array( |
|
|
|
* 'class' => '\yii\logging\EmailTarget', |
|
|
|
* 'class' => 'yii\logging\EmailTarget', |
|
|
|
* 'levels' => 'error, warning', |
|
|
|
* 'levels' => array('error', 'warning'), |
|
|
|
* 'emails' => array('admin@example.com'), |
|
|
|
* 'emails' => array('admin@example.com'), |
|
|
|
* ), |
|
|
|
* ), |
|
|
|
* ), |
|
|
|
* ), |
|
|
@ -73,7 +73,6 @@ class Router extends Component |
|
|
|
public function init() |
|
|
|
public function init() |
|
|
|
{ |
|
|
|
{ |
|
|
|
parent::init(); |
|
|
|
parent::init(); |
|
|
|
|
|
|
|
|
|
|
|
foreach ($this->targets as $name => $target) { |
|
|
|
foreach ($this->targets as $name => $target) { |
|
|
|
if (!$target instanceof Target) { |
|
|
|
if (!$target instanceof Target) { |
|
|
|
$this->targets[$name] = Yii::createObject($target); |
|
|
|
$this->targets[$name] = Yii::createObject($target); |
|
|
|