mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Merge branch 'v2-stable' into beta
This commit is contained in:
commit
6adead274c
@ -292,9 +292,6 @@ abstract class LogStream {
|
|||||||
// Process all filters
|
// Process all filters
|
||||||
if ( $this->_filters != null )
|
if ( $this->_filters != null )
|
||||||
{
|
{
|
||||||
// Evaluation default for now is true
|
|
||||||
$bEval = true;
|
|
||||||
|
|
||||||
// Loop through set properties
|
// Loop through set properties
|
||||||
foreach( $arrProperitesOut as $propertyname => $propertyvalue )
|
foreach( $arrProperitesOut as $propertyname => $propertyvalue )
|
||||||
{
|
{
|
||||||
@ -305,6 +302,13 @@ abstract class LogStream {
|
|||||||
!(is_string($propertyvalue) && strlen($propertyvalue) <= 0) /* Negative because it only matters if the propvalure is a string*/
|
!(is_string($propertyvalue) && strlen($propertyvalue) <= 0) /* Negative because it only matters if the propvalure is a string*/
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
// Evaluation default is true
|
||||||
|
$bEval = true;
|
||||||
|
|
||||||
|
// Default for numeric filters is false!
|
||||||
|
if ( isset($this->_filters[$propertyname][0]) && $this->_filters[$propertyname][0][FILTER_TYPE] == FILTER_TYPE_NUMBER )
|
||||||
|
$bEval = false;
|
||||||
|
|
||||||
// Extra var needed for number checks!
|
// Extra var needed for number checks!
|
||||||
$bIsOrFilter = false; // If enabled we need to check for numbereval later
|
$bIsOrFilter = false; // If enabled we need to check for numbereval later
|
||||||
$bOrFilter = false;
|
$bOrFilter = false;
|
||||||
@ -462,12 +466,17 @@ abstract class LogStream {
|
|||||||
// TODO!
|
// TODO!
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// If was number filter, we apply it the evaluation.
|
// If was number filter, we apply it the evaluation.
|
||||||
if ( $bIsOrFilter )
|
if ( $bIsOrFilter && $bOrFilter)
|
||||||
$bEval &= $bOrFilter;
|
{
|
||||||
|
// Fixed binary comparison to | instead of &!
|
||||||
|
$bEval |= $bOrFilter;
|
||||||
|
//echo "!" . $bOrFilter . "-" . $bEval . "!<br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if evaluation was successfull
|
||||||
if ( !$bEval )
|
if ( !$bEval )
|
||||||
{
|
{
|
||||||
// unmatching filter, reset property array
|
// unmatching filter, reset property array
|
||||||
@ -477,6 +486,7 @@ abstract class LogStream {
|
|||||||
// return error!
|
// return error!
|
||||||
return ERROR_FILTER_NOT_MATCH;
|
return ERROR_FILTER_NOT_MATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -612,11 +622,13 @@ abstract class LogStream {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* OBSELETE CODE
|
||||||
foreach( $tmpValues as $mykey => $szValue )
|
foreach( $tmpValues as $mykey => $szValue )
|
||||||
{
|
{
|
||||||
// First set Filter Mode
|
// First set Filter Mode
|
||||||
$tmpValues[$mykey][FILTER_TMP_MODE] = $this->SetFilterIncludeMode($szValue);
|
$tmpValues[$mykey][FILTER_TMP_MODE] = $this->SetFilterIncludeMode($szValue);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -182,7 +182,7 @@ function InitFilterHelpers()
|
|||||||
if ( isset($_SESSION['filter_messagetype']) )
|
if ( isset($_SESSION['filter_messagetype']) )
|
||||||
$filters['filter_messagetype'] = intval($_SESSION['filter_messagetype']);
|
$filters['filter_messagetype'] = intval($_SESSION['filter_messagetype']);
|
||||||
else
|
else
|
||||||
$filters['filter_messagetype'] = array ( IUT_Syslog, IUT_NT_EventReport, IUT_File_Monitor );
|
$filters['filter_messagetype'] = array ( IUT_Syslog, IUT_NT_EventReport, IUT_File_Monitor, IUT_WEBSERVERLOG );
|
||||||
|
|
||||||
$iCount = count($content['filter_messagetype_list']);
|
$iCount = count($content['filter_messagetype_list']);
|
||||||
for ( $i = 0; $i < $iCount; $i++ )
|
for ( $i = 0; $i < $iCount; $i++ )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user