mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
slow log 기록 시 설정이 활성화 되었을 때만 동작하도록 변경
This commit is contained in:
parent
d1c153e107
commit
41fa49f10c
1 changed files with 13 additions and 1 deletions
|
|
@ -879,10 +879,13 @@ function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debu
|
|||
*/
|
||||
function writeSlowlog($type, $elapsed_time, $obj)
|
||||
{
|
||||
if(!__LOG_SLOW_TRIGGER__ && !__LOG_SLOW_ADDON__ && !__LOG_SLOW_WIDGET__ && !__LOG_SLOW_QUERY__) return;
|
||||
|
||||
static $log_filename = array(
|
||||
'query' => 'files/_slowlog_query.php',
|
||||
'trigger' => 'files/_slowlog_trigger.php',
|
||||
'addon' => 'files/_slowlog_addon.php'
|
||||
'addon' => 'files/_slowlog_addon.php',
|
||||
'widget' => 'files/_slowlog_widget.php'
|
||||
);
|
||||
$write_file = true;
|
||||
|
||||
|
|
@ -897,6 +900,15 @@ function writeSlowlog($type, $elapsed_time, $obj)
|
|||
$buff[] = "\tCaller : " . $obj->caller;
|
||||
$buff[] = "\tCalled : " . $obj->called;
|
||||
}
|
||||
else if($type == 'addon' && __LOG_SLOW_ADDON__ > 0 && $elapsed_time > __LOG_SLOW_ADDON__)
|
||||
{
|
||||
$buff[] = "\tAddon : " . $obj->called;
|
||||
$buff[] = "\tCalled position : " . $obj->caller;
|
||||
}
|
||||
else if($type == 'widget' && __LOG_SLOW_WIDGET__ > 0 && $elapsed_time > __LOG_SLOW_WIDGET__)
|
||||
{
|
||||
$buff[] = "\tWidget : " . $obj->called;
|
||||
}
|
||||
else if($type == 'query' && __LOG_SLOW_QUERY__ > 0 && $elapsed_time > __LOG_SLOW_QUERY__)
|
||||
{
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue