mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-25 10:57:52 +02:00
Fixed issue with deleting all data in MongoDB LogStream source.
This commit is contained in:
parent
e9781d2791
commit
690df992b5
@ -706,11 +706,19 @@ class LogStreamMongoDB extends LogStream {
|
||||
// Set default rowcount
|
||||
$rowcount = null;
|
||||
|
||||
if ( $nDateTimeStamp > 0 )
|
||||
{
|
||||
// Create MongoDate Object from Timestamp
|
||||
$myMongoDate = new MongoDate($nDateTimeStamp);
|
||||
|
||||
// Create Criteria Array
|
||||
$myCriteria = array( $dbmapping[$szTableType]['DBMAPPINGS'][SYSLOG_DATE] => array('$lte' => $myMongoDate) );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use EMPTY array to delete all!
|
||||
$myCriteria = array();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user