mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-20 03:39:56 +09:00
Added connection information to _debug_message.php.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9286 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
415bdcb357
commit
bebb46c072
2 changed files with 11 additions and 2 deletions
|
|
@ -63,6 +63,7 @@
|
|||
var $errno = 0; ///< error code (0 means no error)
|
||||
var $errstr = ''; ///< error message
|
||||
var $query = ''; ///< query string of latest executed query
|
||||
var $connection = '';
|
||||
var $elapsed_time = 0; ///< elapsed time of latest executed query
|
||||
var $elapsed_dbclass_time = 0; ///< elapsed time of latest executed query
|
||||
|
||||
|
|
@ -244,6 +245,7 @@
|
|||
|
||||
$log['query'] = $this->query;
|
||||
$log['elapsed_time'] = $elapsed_time;
|
||||
$log['connection'] = $this->connection;
|
||||
|
||||
// leave error log if an error occured (if __DEBUG_DB_OUTPUT__ is defined)
|
||||
if($this->isError()) {
|
||||
|
|
@ -614,6 +616,7 @@
|
|||
if($type == master){
|
||||
if(!$this->master_db['is_connected'])
|
||||
$this->_connect($type);
|
||||
$this->connection = 'Master ' . $this->master_db['db_hostname'];
|
||||
return $this->master_db["resource"];
|
||||
}
|
||||
|
||||
|
|
@ -622,6 +625,8 @@
|
|||
|
||||
if(!$this->slave_db[$indx]['is_connected'])
|
||||
$this->_connect($type, $indx);
|
||||
|
||||
$this->connection = 'Slave ' . $this->slave_db[$indx]['db_hostname'];
|
||||
return $this->slave_db[$indx]["resource"];
|
||||
}
|
||||
|
||||
|
|
@ -765,6 +770,9 @@
|
|||
$connection["resource"] = $result;
|
||||
$connection["is_connected"] = true;
|
||||
|
||||
// Save connection info for db logs
|
||||
$this->connection = ucfirst($type) . ' ' . $connection["db_hostname"];
|
||||
|
||||
$this->_afterConnect($result);
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class DisplayHandler
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief DisplayHandler is responsible for displaying the execution result. \n
|
||||
* @brief DisplayHandler is responsible for displaying the execution result. \n
|
||||
* Depending on the request type, it can display either HTML or XML content.\n
|
||||
* Xml content is simple xml presentation of variables in oModule while html content
|
||||
* is the combination of the variables of oModue and template files/.
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
var $handler = null;
|
||||
|
||||
/**
|
||||
* @brief print either html or xml content given oModule object
|
||||
* @brief print either html or xml content given oModule object
|
||||
* @remark addon execution and the trigger execution are included within this method, which
|
||||
* might create inflexibility for the fine grained caching
|
||||
* @param[in] $oModule the module object
|
||||
|
|
@ -183,6 +183,7 @@
|
|||
} else {
|
||||
$buff .= sprintf("Query $s : %d\n\t\t\t %s\n", $query['result'], $query['errno'], $query['errstr']);
|
||||
}
|
||||
$buff .= sprintf("\t\tConnection: %s\n", $query['connection']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue