PHP Notice: Trying to get property 'enabled' of non-object in /app/vendor/yiisoft/yii2/log/Dispatcher.php on line 187
bianchi opened this issue · comments
I'm having this error:
PHP Notice: Trying to get property 'enabled' of non-object in /app/vendor/yiisoft/yii2/log/Dispatcher.php on line 187
i'm using the readme configuration:
'log' => [
'targets' => [
[
'class' => 'codemix\streamlog\Target',
'url' => 'php://stdout',
'levels' => ['info','trace'],
'logVars' => [],
],
[
'class' => 'codemix\streamlog\Target',
'url' => 'php://stderr',
'levels' => ['error', 'warning'],
'logVars' => [],
],
],
],
and added 'bootstrap' => ['log']
, to config file.
Can someone help?
I have pretty much the same configuration and it works fine. Are you sure you didn't change anything else?
I can't see how this should happen from the config you have. Check yii\log\Dispatcher::init()
: There the log targets are instantiated from your targets
arrays. If instantiation would fail, you'd get an error from Yii::createObject()
.
Thanks for the quickly reply. Just found out my composer update was failing and I was not seeing it. Everything is working now, thank you