mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-25 18:59:12 +02:00
Merge branch 'v2-stable' into beta
Conflicts: ChangeLog src/include/functions_common.php
This commit is contained in:
commit
0bd24c597c
@ -1,4 +1,13 @@
|
||||
---------------------------------------------------------------------------
|
||||
Version 2.6.3 (v2-stable), 2009-04-29
|
||||
- Fixed a bug that caused fields like syslog facily, severity or
|
||||
messagetype to be shown numeric instead of readable
|
||||
coloured replacements.
|
||||
- Fixed a bug in the detail page which could cause numeric fields
|
||||
to be missing.
|
||||
- Added support for debug output in the data cleanup routine of
|
||||
mysql and pdo logstreams. This will help troubleshooting.
|
||||
---------------------------------------------------------------------------
|
||||
Version 2.7.0 (beta), 2009-03-26
|
||||
- Added support for dynamic filenames in disk logstream by using
|
||||
replacement characters. See the doc for details.
|
||||
|
@ -657,7 +657,6 @@ class LogStreamDB extends LogStream {
|
||||
// Set default rowcount
|
||||
$rowcount = null;
|
||||
|
||||
|
||||
// Perform if Connection is true!
|
||||
if ( $this->_dbhandle != null )
|
||||
{
|
||||
@ -678,6 +677,11 @@ class LogStreamDB extends LogStream {
|
||||
// Free result not needed here!
|
||||
//mysql_free_result ($myQuery);
|
||||
}
|
||||
else
|
||||
{
|
||||
// error occured, output DEBUG message
|
||||
$this->PrintDebugError("CleanupLogdataByDate failed with SQL Statement ' " . $szSql . " '");
|
||||
}
|
||||
}
|
||||
|
||||
//return affected rows
|
||||
@ -1224,21 +1228,15 @@ class LogStreamDB extends LogStream {
|
||||
*/
|
||||
private function PrintDebugError($szErrorMsg)
|
||||
{
|
||||
if ( GetConfigSetting("MiscShowDebugMsg", 0, CFGLEVEL_USER) == 1 )
|
||||
{
|
||||
$errdesc = mysql_error();
|
||||
$errno = mysql_errno();
|
||||
$errdesc = mysql_error();
|
||||
$errno = mysql_errno();
|
||||
|
||||
$errormsg="Database error: $szErrorMsg <br>";
|
||||
$errormsg.="mysql error: $errdesc <br>";
|
||||
$errormsg.="mysql error number: $errno <br>";
|
||||
$errormsg.="Date: ".date("d.m.Y @ H:i"). "<br>";
|
||||
$errormsg.="Script: ".getenv("REQUEST_URI"). "<br>";
|
||||
$errormsg.="Referer: ".getenv("HTTP_REFERER"). "<br>";
|
||||
|
||||
//Output!
|
||||
OutputDebugMessage("LogStreamDB|CreateMainSQLQuery: $errormsg", DEBUG_ERROR);
|
||||
}
|
||||
$errormsg="$szErrorMsg <br>";
|
||||
$errormsg.="Detail error: $errdesc <br>";
|
||||
$errormsg.="Error Code: $errno <br>";
|
||||
|
||||
//Output!
|
||||
OutputDebugMessage("LogStreamDB|PrintDebugError: $errormsg", DEBUG_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -669,6 +669,11 @@ class LogStreamPDO extends LogStream {
|
||||
// Free query now
|
||||
$myQuery->closeCursor();
|
||||
}
|
||||
else
|
||||
{
|
||||
// error occured, output DEBUG message
|
||||
$this->PrintDebugError("CleanupLogdataByDate failed with SQL Statement ' " . $szSql . " '");
|
||||
}
|
||||
}
|
||||
|
||||
//return affected rows
|
||||
@ -1224,20 +1229,15 @@ class LogStreamPDO extends LogStream {
|
||||
*/
|
||||
private function PrintDebugError($szErrorMsg)
|
||||
{
|
||||
if ( GetConfigSetting("MiscShowDebugMsg", 0, CFGLEVEL_USER) == 1 )
|
||||
{
|
||||
$errdesc = $this->_dbhandle == null ? "" : implode( ";", $this->_dbhandle->errorInfo() );
|
||||
$errno = $this->_dbhandle == null ? "" : $this->_dbhandle->errorCode();
|
||||
$errdesc = $this->_dbhandle == null ? "" : implode( ";", $this->_dbhandle->errorInfo() );
|
||||
$errno = $this->_dbhandle == null ? "" : $this->_dbhandle->errorCode();
|
||||
|
||||
$errormsg ="<font color='red'>Error: " . $szErrorMsg . "</font></H3><br>";
|
||||
$errormsg.="<B>Errordetails:</B><br>";
|
||||
$errormsg.="Detail Error: $errdesc <br>";
|
||||
$errormsg.="Error Code: $errno <br>";
|
||||
$errormsg.="Date: ".date("d.m.Y @ H:i"). "<br>";
|
||||
|
||||
//Output!
|
||||
OutputDebugMessage("LogStreamPDO|CreateMainSQLQuery: $errormsg", DEBUG_ERROR);
|
||||
}
|
||||
$errormsg="$szErrorMsg <br>";
|
||||
$errormsg.="Detail error: $errdesc <br>";
|
||||
$errormsg.="Error Code: $errno <br>";
|
||||
|
||||
//Output!
|
||||
OutputDebugMessage("LogStreamPDO|PrintDebugError: $errormsg", DEBUG_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -185,7 +185,7 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['uid_current'
|
||||
$counter = 0;
|
||||
foreach($content['fields'] as $mycolkey => $myfield)
|
||||
{
|
||||
if ( isset($logArray[$mycolkey]) && ( is_array($logArray[$mycolkey]) || (is_string($logArray[$mycolkey]) && strlen($logArray[$mycolkey]) > 0)) )
|
||||
if ( isset($logArray[$mycolkey]) && ( is_array($logArray[$mycolkey]) || (is_string($logArray[$mycolkey]) && strlen($logArray[$mycolkey]) > 0)) || (is_numeric($logArray[$mycolkey])) )
|
||||
{
|
||||
$content['fields'][$mycolkey]['fieldenabled'] = true;
|
||||
|
||||
@ -220,7 +220,8 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['uid_current'
|
||||
// Special style classes and colours for SYSLOG_FACILITY
|
||||
if ( $mycolkey == SYSLOG_FACILITY )
|
||||
{
|
||||
if ( isset($logArray[$mycolkey][SYSLOG_FACILITY]) && strlen($logArray[$mycolkey][SYSLOG_FACILITY]) > 0)
|
||||
// if ( isset($logArray[$mycolkey][SYSLOG_FACILITY]) && strlen($logArray[$mycolkey][SYSLOG_FACILITY]) > 0)
|
||||
if ( isset($logArray[$mycolkey]) && is_numeric($logArray[$mycolkey]) )
|
||||
{
|
||||
$content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $facility_colors[ $logArray[SYSLOG_FACILITY] ] . '" ';
|
||||
$content['fields'][$mycolkey]['cssclass'] = "lineColouredBlack";
|
||||
@ -236,7 +237,8 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['uid_current'
|
||||
}
|
||||
else if ( $mycolkey == SYSLOG_SEVERITY )
|
||||
{
|
||||
if ( isset($logArray[$mycolkey][SYSLOG_SEVERITY]) && strlen($logArray[$mycolkey][SYSLOG_SEVERITY]) > 0)
|
||||
// if ( isset($logArray[$mycolkey][SYSLOG_SEVERITY]) && strlen($logArray[$mycolkey][SYSLOG_SEVERITY]) > 0)
|
||||
if ( isset($logArray[$mycolkey]) && is_numeric($logArray[$mycolkey]) )
|
||||
{
|
||||
$content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $severity_colors[ $logArray[SYSLOG_SEVERITY] ] . '" ';
|
||||
$content['fields'][$mycolkey]['cssclass'] = "lineColouredWhite";
|
||||
@ -252,7 +254,8 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['uid_current'
|
||||
}
|
||||
else if ( $mycolkey == SYSLOG_MESSAGETYPE )
|
||||
{
|
||||
if ( isset($logArray[$mycolkey][SYSLOG_MESSAGETYPE]) )
|
||||
// if ( isset($logArray[$mycolkey][SYSLOG_MESSAGETYPE]) )
|
||||
if ( isset($logArray[$mycolkey]) && is_numeric($logArray[$mycolkey]) )
|
||||
{
|
||||
$content['fields'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $msgtype_colors[ $logArray[SYSLOG_MESSAGETYPE] ] . '" ';
|
||||
$content['fields'][$mycolkey]['cssclass'] = "lineColouredBlack";
|
||||
|
@ -382,7 +382,8 @@ if ( isset($content['Sources'][$currentSourceID]) )
|
||||
// Special style classes and colours for SYSLOG_FACILITY
|
||||
if ( $mycolkey == SYSLOG_FACILITY )
|
||||
{
|
||||
if ( isset($logArray[$mycolkey][SYSLOG_FACILITY]) && strlen($logArray[$mycolkey][SYSLOG_FACILITY]) > 0)
|
||||
// if ( isset($logArray[$mycolkey][SYSLOG_FACILITY]) && strlen($logArray[$mycolkey][SYSLOG_FACILITY]) > 0)
|
||||
if ( isset($logArray[$mycolkey]) && is_numeric($logArray[$mycolkey]) )
|
||||
{
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $facility_colors[ $logArray[SYSLOG_FACILITY] ] . '" ';
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldcssclass'] = "lineColouredBlack";
|
||||
@ -401,7 +402,8 @@ if ( isset($content['Sources'][$currentSourceID]) )
|
||||
}
|
||||
else if ( $mycolkey == SYSLOG_SEVERITY )
|
||||
{
|
||||
if ( isset($logArray[$mycolkey][SYSLOG_SEVERITY]) && strlen($logArray[$mycolkey][SYSLOG_SEVERITY]) > 0)
|
||||
// if ( isset($logArray[$mycolkey][SYSLOG_SEVERITY]) && strlen($logArray[$mycolkey][SYSLOG_SEVERITY]) > 0)
|
||||
if ( isset($logArray[$mycolkey]) && is_numeric($logArray[$mycolkey]) )
|
||||
{
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $severity_colors[ $logArray[SYSLOG_SEVERITY] ] . '" ';
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldcssclass'] = "lineColouredWhite";
|
||||
@ -420,7 +422,8 @@ if ( isset($content['Sources'][$currentSourceID]) )
|
||||
}
|
||||
else if ( $mycolkey == SYSLOG_MESSAGETYPE )
|
||||
{
|
||||
if ( isset($logArray[$mycolkey][SYSLOG_MESSAGETYPE]) )
|
||||
// if ( isset($logArray[$mycolkey][SYSLOG_MESSAGETYPE]) )
|
||||
if ( isset($logArray[$mycolkey]) && is_numeric($logArray[$mycolkey]) )
|
||||
{
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $msgtype_colors[ $logArray[SYSLOG_MESSAGETYPE] ] . '" ';
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldcssclass'] = "lineColouredBlack";
|
||||
|
Loading…
x
Reference in New Issue
Block a user