pub fn log_pattern(mut self, overall_pattern: &str, drain_field: &str) -> Self {
        self.overall_pattern_str = Some(String::from(overall_pattern));
        self.drain_field = Some(String::from(drain_field));
        self
    }
/// The overall log pattern and which extracted field to cluster
/// most logging formats have a well known format mixed with semi-structured text
/// This allows you to set the well known format and then only cluster on the semi-structured
/// text.
/// If you set this, be sure to call `build_patterns` so that they can be compiled before use.
///
/// # Examples:
/// ```
/// let mut g = grok::Grok::with_patterns();
/// let filter_patterns = vec![
///         "blk_(|-)[0-9]+",     //blockid
///        "%{IPV4:ip_address}", //IP
///         "%{NUMBER:number}",   //Num
///     ];
/// let mut drain = drain_rs::DrainTree::new()
///         // HDFS log pattern, variable format printout in the content section
///         .log_pattern("%{NUMBER:date} %{NUMBER:time} %{NUMBER:proc} %{LOGLEVEL:level} %{DATA:component}: %{GREEDYDATA:content}", "content")
///         .build_patterns(&mut g);
///  ```
The overall log pattern and which extracted field to cluster
most logging formats have a well known format mixed with semi-structured text
This allows you to set the well known format and then only cluster on the semi-structured
text.
If you set this, be sure to call `build_patterns` so that they can be compiled before use.
The overall log pattern and which extracted field to cluster most logging formats have a well known format mixed with semi - structured text This allows you to set the well known format and then only cluster on the semi - structured text . If you set this be sure to call ` build_patterns ` so that they can be compiled before use .
pub fn log_pattern(mut self, overall_pattern: &str, drain_field: &str) -> Self {
        self.overall_pattern_str = Some(String::from(overall_pattern));
        self.drain_field = Some(String::from(drain_field));
        self
    }
pub fn log_pattern ( mut self , overall_pattern : & str , drain_field : & str ) -> Self { self . overall_pattern_str = Some ( String :: from ( overall_pattern ) ) ; self . drain_field = Some ( String :: from ( drain_field ) ) ; self }
The overall log pattern and which extracted field to cluster
most logging formats have a well known format mixed with semi-structured text
This allows you to set the well known format and then only cluster on the semi-structured
text.
The overall log pattern and which extracted field to cluster most logging formats have a well known format mixed with semi - structured text This allows you to set the well known format and then only cluster on the semi - structured text .
mut self
overall_pattern
&str
drain_field
&str
mut self
overall_pattern
&str
drain_field
&str
examples:
```
let mut g = grok::Grok::with_patterns();
let filter_patterns = vec![
"blk_(|-)[0-9]+",     //blockid
"%{IPV4:ip_address}", //IP
"%{NUMBER:number}",   //Num
];
let mut drain = drain_rs::DrainTree::new()
HDFS log pattern, variable format printout in the content section
.log_pattern("%{NUMBER:date} %{NUMBER:time} %{NUMBER:proc} %{LOGLEVEL:level} %{DATA:component}: %{GREEDYDATA:content}", "content")
.build_patterns(&mut g);
```
` ` ` let mut g = grok :: Grok :: with_patterns () ; let filter_patterns = vec! [ " blk_ ( | - ) [ 0 - 9 ] + " // blockid " % { IPV4 : ip_address } " // IP " % { NUMBER : number } " // Num ] ; let mut drain = drain_rs :: DrainTree :: new () HDFS log pattern variable format printout in the content section . log_pattern ( " % { NUMBER : date } % { NUMBER : time } % { NUMBER : proc } % { LOGLEVEL : level } % { DATA : component } : % { GREEDYDATA : content } " " content " ) . build_patterns ( &mut g ) ; ` ` `