Revert "Feature/output errorlog#301" (#314)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use crate::detections::print::AlertMessage;
|
||||
use crate::detections::print::ERROR_LOG_PATH;
|
||||
use crate::detections::rule::AggResult;
|
||||
use crate::detections::rule::AggregationParseInfo;
|
||||
use crate::detections::rule::Message;
|
||||
@@ -7,8 +6,6 @@ use crate::detections::rule::RuleNode;
|
||||
use chrono::{DateTime, TimeZone, Utc};
|
||||
use hashbrown::HashMap;
|
||||
use serde_json::Value;
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::BufWriter;
|
||||
use std::num::ParseIntError;
|
||||
use std::path::Path;
|
||||
|
||||
@@ -186,12 +183,7 @@ impl TimeFrameInfo {
|
||||
tnum.retain(|c| c != 'd');
|
||||
} else {
|
||||
AlertMessage::alert(
|
||||
&mut BufWriter::new(
|
||||
OpenOptions::new()
|
||||
.append(true)
|
||||
.open(ERROR_LOG_PATH.to_string())
|
||||
.unwrap(),
|
||||
),
|
||||
&mut std::io::stderr().lock(),
|
||||
format!("Timeframe is invalid. Input value:{}", value),
|
||||
)
|
||||
.ok();
|
||||
@@ -223,13 +215,8 @@ pub fn get_sec_timeframe(timeframe: &Option<TimeFrameInfo>) -> Option<i64> {
|
||||
}
|
||||
Err(err) => {
|
||||
AlertMessage::alert(
|
||||
&mut BufWriter::new(
|
||||
OpenOptions::new()
|
||||
.append(true)
|
||||
.open(ERROR_LOG_PATH.to_string())
|
||||
.unwrap(),
|
||||
),
|
||||
format!("Timeframe number is invalid. timeframe: {}", err),
|
||||
&mut std::io::stderr().lock(),
|
||||
format!("Timeframe number is invalid. timeframe.{}", err),
|
||||
)
|
||||
.ok();
|
||||
return Option::None;
|
||||
|
||||
Reference in New Issue
Block a user