Reputation: 5455
how to get the logPath defined in the main.php of the config in yii? I tried ,
CFileLogRoute::getLogPath();
doesn't work, lol, I don't know how to call it properly to output the value of it
Upvotes: 2
Views: 365
Reputation: 8597
Not sure why you would need that path, but here it goes:
foreach(Yii::app()->log->routes as $route) {
if($route instanceof CFileLogRoute) {
echo "logPath: ".$route->logPath;
}
}
Upvotes: 3