Last active
July 1, 2016 04:38
-
-
Save dominicgan/f6ad5e2ac9af2f89915bf22ce8c6310e to your computer and use it in GitHub Desktop.
Yii config to enable both yii log types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// you will need to create multiple vhost to view both log types | |
$http_host_development_trace = "www.url.trace"; // first vhost | |
$http_host_development_debug = "www.url.debug"; // second vhost | |
if (isset($_SERVER["HTTP_HOST"]) && $_SERVER["HTTP_HOST"] == $http_host_development_trace) { | |
$db['username'] = 'root'; | |
$db['password'] = 'root'; | |
$db['enableProfiling'] = true; | |
$db['schemaCachingDuration'] = 60; | |
$log['routes'][] = array( | |
'class'=>'CWebLogRoute', | |
'levels'=>'trace, info', | |
'categories'=>'system.*', | |
); | |
$srbac_debug = false; | |
} | |
if (isset($_SERVER["HTTP_HOST"]) && $_SERVER["HTTP_HOST"] == $http_host_development_debug) { | |
$db['username'] = 'root'; | |
$db['password'] = 'root'; | |
$db['enableProfiling'] = true; | |
$db['schemaCachingDuration'] = 60; | |
$log['routes'][] = array( | |
'class' => 'CProfileLogRoute', | |
'report'=>'summary', | |
'levels'=>'error, warning, trace, info, private', | |
'categories'=>'system.*', | |
); | |
$srbac_debug = false; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment