mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
#278 debug 환경 개선.
- query 목록에 query id와 파일 및 메소드명 표시 - 실행 중 중단 시 중단 시점의 파일과 메소드명 표시
This commit is contained in:
parent
7845927721
commit
25ca3e1d14
6 changed files with 84 additions and 44 deletions
|
|
@ -436,19 +436,24 @@ class DB
|
|||
$elapsed_time = $this->act_finish - $this->act_start;
|
||||
$this->elapsed_time = $elapsed_time;
|
||||
$GLOBALS['__db_elapsed_time__'] += $elapsed_time;
|
||||
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||
$bt = $bt[6];
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$log = array();
|
||||
$log['query'] = $this->query;
|
||||
$log['elapsed_time'] = $elapsed_time;
|
||||
$log['connection'] = $this->connection;
|
||||
$log['query_id'] = $this->query_id;
|
||||
$log['module'] = $site_module_info->module;
|
||||
$log['act'] = Context::get('act');
|
||||
$log['time'] = date('Y-m-d H:i:s');
|
||||
$log['called_file'] = $bt['file'].':'.$bt['line'];
|
||||
$log['called_method'] = $bt['class'].$bt['type'].$bt['function'];
|
||||
|
||||
// leave error log if an error occured (if __DEBUG_DB_OUTPUT__ is defined)
|
||||
if($this->isError())
|
||||
{
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$log['module'] = $site_module_info->module;
|
||||
$log['act'] = Context::get('act');
|
||||
$log['time'] = date('Y-m-d H:i:s');
|
||||
$log['result'] = 'Failed';
|
||||
$log['errno'] = $this->errno;
|
||||
$log['errstr'] = $this->errstr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue