Yii Framework Forum: Unable to disabled log component in yii2.0 REST api - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Unable to disabled log component in yii2.0 REST api

#1 User is offline   tango 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 03-December 15

Posted 14 March 2018 - 11:24 AM

I am trying to disabled logging in rest api and trying this command

Yii::$app->log->targets['file']->enabled = false;

but its not disabled logging, still i can see the log entry added whenever any error/warning comes to the rest api.


config setting
---------------

'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
'file'=>[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
'logVars' => [ '_FILES'],
],
],
],
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users