【问题标题】:Yii Db Profiler Not Working - 'enableprofiling'=>TrueYii Db Profiler 不工作 - 'enableprofiling'=>True
【发布时间】:2013-09-18 10:32:06
【问题描述】:

我已启用配置文件以显示在 yii 中,如下所示。

'db'=>array(
      'connectionString'=>'pgsql:host=localhost;port=5432;dbname=ijob_css',
      'username'=>'postgres',
      'password'=>'allion123',
      'enableProfiling'=>true,
      'schemaCachingDuration'=>604800
   ),

但我仍然没有在网站页面下显示任何内容并且它是空的。

在它起作用之前,最近我被

'enableProfiling'=>假

为什么它不起作用?我一定是错过了什么。

【问题讨论】:

  • 是否配置了log 组件?它必须处理所有分析信息
  • 我正在使用:'enableProfiling'=>true,它对我有用...你不能从 DB 中读取任何内容吗?
  • @RuslanPolutsygan tnx 添加此解决方案。 'class'=>'CProfileLogRoute

标签: php yii profiling


【解决方案1】:

将此添加到主配置解决了该问题。 'class'=>'CProfileLogRoute',

'components'=>array(
      'log'=>array(
          'class'=>'CLogRouter',
          'routes'=>array(
             array(
               'class'=>'CFileLogRoute',
               'levels'=>'error, warning',
            ),
            array(
               'class'=>'CProfileLogRoute',
            ),

【讨论】:

    猜你喜欢
    • 2017-06-16
    • 1970-01-01
    • 1970-01-01
    • 2012-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多