mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-25 18:59:12 +02:00
Error details of logstream sources will now be shown on detail page as well
This commit is contained in:
parent
c06271ff8a
commit
103baa8245
@ -1363,6 +1363,8 @@ class LogStreamDB extends LogStream {
|
||||
*/
|
||||
private function PrintDebugError($szErrorMsg)
|
||||
{
|
||||
global $extraErrorDescription;
|
||||
|
||||
$errdesc = mysql_error();
|
||||
$errno = mysql_errno();
|
||||
|
||||
@ -1370,6 +1372,9 @@ class LogStreamDB extends LogStream {
|
||||
$errormsg.="Detail error: $errdesc <br>";
|
||||
$errormsg.="Error Code: $errno <br>";
|
||||
|
||||
// Add to additional error output
|
||||
$extraErrorDescription = $errormsg;
|
||||
|
||||
//Output!
|
||||
OutputDebugMessage("LogStreamDB|PrintDebugError: $errormsg", DEBUG_ERROR);
|
||||
}
|
||||
|
@ -1556,6 +1556,8 @@ class LogStreamPDO extends LogStream {
|
||||
*/
|
||||
private function PrintDebugError($szErrorMsg)
|
||||
{
|
||||
global $extraErrorDescription;
|
||||
|
||||
$errdesc = $this->_dbhandle == null ? "" : implode( ";", $this->_dbhandle->errorInfo() );
|
||||
$errno = $this->_dbhandle == null ? "" : $this->_dbhandle->errorCode();
|
||||
|
||||
@ -1563,6 +1565,9 @@ class LogStreamPDO extends LogStream {
|
||||
$errormsg.="Detail error: $errdesc <br>";
|
||||
$errormsg.="Error Code: $errno <br>";
|
||||
|
||||
// Add to additional error output
|
||||
$extraErrorDescription = $errormsg;
|
||||
|
||||
//Output!
|
||||
OutputDebugMessage("LogStreamPDO|PrintDebugError: $errormsg", DEBUG_ERROR);
|
||||
}
|
||||
|
@ -403,10 +403,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['uid_current'
|
||||
|
||||
if ( $ret == ERROR_UNDEFINED )
|
||||
$content['detailederror'] = "Undefined error happened within the logstream.";
|
||||
// else if ( $ret == ERROR_FILE_NOT_READABLE )
|
||||
// $content['detailederror'] = "Syslog file is not readable, read access may be denied. ";
|
||||
else
|
||||
$content['detailederror'] = "Unknown or unhandeled error occured.";
|
||||
// Add extra error stuff
|
||||
if ( isset($extraErrorDescription) )
|
||||
$content['detailederror'] .= "<br><br>" . GetAndReplaceLangStr( $content['LN_SOURCES_ERROR_EXTRAMSG'], $extraErrorDescription);
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user