drop DEBUG_SQL - all of that info is included in the trace file, fixes #674
This commit is contained in:
parent
4cadce1de0
commit
bca74a0db5
3 changed files with 0 additions and 14 deletions
|
@ -123,7 +123,6 @@ function do_install()
|
||||||
}
|
}
|
||||||
|
|
||||||
define("CACHE_DSN", null);
|
define("CACHE_DSN", null);
|
||||||
define("DEBUG_SQL", false);
|
|
||||||
define("DATABASE_KA", true);
|
define("DATABASE_KA", true);
|
||||||
install_process();
|
install_process();
|
||||||
} // }}}
|
} // }}}
|
||||||
|
|
|
@ -193,18 +193,6 @@ class Database
|
||||||
global $_tracer;
|
global $_tracer;
|
||||||
$dur = microtime(true) - $start;
|
$dur = microtime(true) - $start;
|
||||||
$_tracer->complete($start * 1000000, $dur * 1000000, "DB Query", ["query"=>$query, "args"=>$args]);
|
$_tracer->complete($start * 1000000, $dur * 1000000, "DB Query", ["query"=>$query, "args"=>$args]);
|
||||||
|
|
||||||
if ((DEBUG_SQL === true) || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) {
|
|
||||||
$query = trim(preg_replace('/\s+/msi', ' ', $query));
|
|
||||||
if (isset($args) && is_array($args) && !empty($args)) {
|
|
||||||
$text = $query." -- ".join(", ", $args)."\n";
|
|
||||||
} else {
|
|
||||||
$text = $query."\n";
|
|
||||||
}
|
|
||||||
$text .= "$method:$dur\n";
|
|
||||||
file_put_contents("data/sql.log", $text, FILE_APPEND);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->query_count++;
|
$this->query_count++;
|
||||||
$this->dbtime += $dur;
|
$this->dbtime += $dur;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@ _d("DATABASE_KA", true); // string Keep database connection alive
|
||||||
_d("DATABASE_TIMEOUT", 10000);// int Time to wait for each statement to complete
|
_d("DATABASE_TIMEOUT", 10000);// int Time to wait for each statement to complete
|
||||||
_d("CACHE_DSN", null); // string cache connection details
|
_d("CACHE_DSN", null); // string cache connection details
|
||||||
_d("DEBUG", false); // boolean print various debugging details
|
_d("DEBUG", false); // boolean print various debugging details
|
||||||
_d("DEBUG_SQL", false); // boolean dump SQL queries to data/sql.log
|
|
||||||
_d("DEBUG_CACHE", false); // boolean dump cache queries to data/cache.log
|
_d("DEBUG_CACHE", false); // boolean dump cache queries to data/cache.log
|
||||||
_d("COVERAGE", false); // boolean activate xdebug coverage monitor
|
_d("COVERAGE", false); // boolean activate xdebug coverage monitor
|
||||||
_d("CACHE_HTTP", false); // boolean output explicit HTTP caching headers
|
_d("CACHE_HTTP", false); // boolean output explicit HTTP caching headers
|
||||||
|
|
Reference in a new issue