Yii 剖析器获取方法名称


Yii profiler get methods names

我的目标是了解我的应用程序执行的所有步骤。例:

Method1() -> Method2() -> Method3() 

我怎样才能做到这一点?我记录了每一个:我的日志看起来像:

    'routes' => [
        [
            'class' => 'CFileLogRoute',
            'levels' => 'error, warning, trace, info, profile',
            'categories' => 'system.*',
        ],

打赌日志中仍然没有方法名称。

要改进分析存在的问题,请执行以下操作

define('YII_TRACE_LEVEL',3);

这将允许获取方法调用中的文件行号。在日志中,您将像以下情况一样进行一些精简:

UserController.php 78 line 'SELECT * FROM `users`'