* adjust the log path.

This commit is contained in:
wangchunsheng
2009-12-30 05:44:20 +00:00
parent d3d3e1ac68
commit 7d8b5a6a8a

View File

@@ -83,8 +83,9 @@ function _getTime()
function _saveSQL()
{
global $app;
$sqlLog = $app->getCacheRoot() . 'sql.' . date('Ymd') . '.log';
$fh = fopen($sqlLog, 'a');
$sqlLog = $app->getLogRoot() . 'sql.' . date('Ymd') . '.log';
$fh = @fopen($sqlLog, 'a');
if(!$fh) return false;
fwrite($fh, date('Ymd H:i:s') . ": " . $app->getURI() . "\n");
foreach(dao::$querys as $query) fwrite($fh, " $query\n");
fwrite($fh, "\n");