Show stack traces on the message log page

remotes/upstream/api-rewrite
Mike Koch 7 년 전
부모 f15cb63d32
커밋 cc880a15fc

@ -97,6 +97,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<th><?php echo $hesklang['user']; ?></th>
<th><?php echo $hesklang['custom_place']; ?></th>
<th><?php echo $hesklang['message']; ?></th>
<th><?php echo $hesklang['stack_trace_header']; ?></th>
</tr>
</thead>
<tbody></tbody>

@ -122,7 +122,8 @@ function getLoggingLocation($exception) {
// http://stackoverflow.com/a/9133897/1509431
$trace = $exception->getTrace();
$lastCall = $trace[0];
return basename($lastCall['file'], '.php');
$location = basename($lastCall['file'], '.php');
return "REST API: {$location}";
}
/**

@ -23,12 +23,15 @@ function search_log($hesk_settings, $location, $from_date, $to_date, $severity_i
if ($severity_id != NULL) {
$sql .= "AND `severity` = " . intval($severity_id);
}
$sql .= " ORDER BY `id` DESC";
$rs = hesk_dbQuery($sql);
$results = array();
while ($row = hesk_dbFetchAssoc($rs)) {
$row['timestamp'] = hesk_date($row['timestamp'], true);
$row['stackTrace'] = nl2br($row['stack_trace']);
unset($row['stack_trace']);
$results[] = $row;
}

@ -53,7 +53,8 @@ function displayResults(data) {
'<td>' + result.timestamp + '</td>' +
'<td>' + result.username + '</td>' +
'<td>' + result.location + '</td>' +
'<td>' + result.message + '</td>');
'<td>' + result.message + '</td>' +
'<td>' + result.stackTrace + '</td>');
}
}
}

@ -45,6 +45,9 @@ $hesklang['_COLLATE']='utf8_unicode_ci';
// This is the email break line that will be used in email piping
$hesklang['EMAIL_HR']='------ Reply above this line ------';
// ADDED OR MODIFIED IN Mods for HESK 3.1.0
$hesklang['stack_trace_header'] = 'Stack Trace';
// ADDED OR MODIFIED IN Mods for HESK 3.0.0
$hesklang['you_have_x_messages'] = 'You have %s new %s'; // %s: Number of new messages, "message" or "messages", depending on #
$hesklang['message_lower_case'] = 'message';

불러오는 중...
취소
저장