YII logging for debugging

前端 未结 3 1409
无人共我
无人共我 2021-02-09 08:00

In many cases, Xdebug is not suitable for debugging as it involves clicks to run to a particular line of codes. I want to use something that is similar to cak

3条回答
  •  失恋的感觉
    2021-02-09 08:52

    In Yii2

    Yii::trace(VarDumper::dumpAsString($array));
    

    An example of customized log class is given below.

    Example:

     Log.e("Copying the Estimate data failed. Model::getError(): ", 
            $model->getErrors());
    

提交回复
热议问题