/*
	Initializes a known set of log event breakers. (Note: Usually dates and ip addresses are commonly used as event breakers.)
*/
Initializes a known set of log event breakers. (Note: Usually dates and ip addresses are commonly used as event breakers.)
/ * Initializes a known set of log event breakers . ( Note : Usually dates and ip addresses are commonly used as event breakers . ) * /
func NewEventBreakers() *KnownEventBreakers {
	eventBreakers := new(KnownEventBreakers)
	ipPattern, _ := regexp.Compile(`^\s*(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}`)
	datePattern1, _ := regexp.Compile(`^\s*\d{4}-[01]{1}\d{1}-[0-3]{1}\d{1} [0-2]{1}\d{1}:[0-6]{1}\d{1}:[0-6]{1}\d{1}`)
	datePattern2, _ := regexp.Compile(`^\s*\[\d{4}-[01]{1}\d{1}-[0-3]{1}\d{1} [0-2]{1}\d{1}:[0-6]{1}\d{1}:[0-6]{1}\d{1}\]`)
	datePattern3, _ := regexp.Compile(`^\s*\d{4}-[01]{1}\d{1}-[0-3]{1}\d{1}T[0-2]{1}\d{1}:[0-6]{1}\d{1}:[0-6]{1}\d{1}`)
	datePattern4, _ := regexp.Compile(`^\[\d{4}-[01]{1}\d{1}-[0-3]{1}\d{1}T[0-2]{1}\d{1}:[0-6]{1}\d{1}:[0-6]{1}\d{1},\d{3}\+\d{4}\]`)
	eventBreakers.regexExp = append(eventBreakers.regexExp, *ipPattern)
	eventBreakers.regexExp = append(eventBreakers.regexExp, *datePattern1)
	eventBreakers.regexExp = append(eventBreakers.regexExp, *datePattern2)
	eventBreakers.regexExp = append(eventBreakers.regexExp, *datePattern3)
	eventBreakers.regexExp = append(eventBreakers.regexExp, *datePattern4)
	return eventBreakers
}
func NewEventBreakers ( ) * KnownEventBreakers { eventBreakers := new ( KnownEventBreakers ) ipPattern , _ := regexp . Compile ( `^\s*(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}` ) datePattern1 , _ := regexp . Compile ( `^\s*\d{4}-[01]{1}\d{1}-[0-3]{1}\d{1} [0-2]{1}\d{1}:[0-6]{1}\d{1}:[0-6]{1}\d{1}` ) datePattern2 , _ := regexp . Compile ( `^\s*\[\d{4}-[01]{1}\d{1}-[0-3]{1}\d{1} [0-2]{1}\d{1}:[0-6]{1}\d{1}:[0-6]{1}\d{1}\]` ) datePattern3 , _ := regexp . Compile ( `^\s*\d{4}-[01]{1}\d{1}-[0-3]{1}\d{1}T[0-2]{1}\d{1}:[0-6]{1}\d{1}:[0-6]{1}\d{1}` ) datePattern4 , _ := regexp . Compile ( `^\[\d{4}-[01]{1}\d{1}-[0-3]{1}\d{1}T[0-2]{1}\d{1}:[0-6]{1}\d{1}:[0-6]{1}\d{1},\d{3}\+\d{4}\]` ) eventBreakers . regexExp = append ( eventBreakers . regexExp , * ipPattern ) eventBreakers . regexExp = append ( eventBreakers . regexExp , * datePattern1 ) eventBreakers . regexExp = append ( eventBreakers . regexExp , * datePattern2 ) eventBreakers . regexExp = append ( eventBreakers . regexExp , * datePattern3 ) eventBreakers . regexExp = append ( eventBreakers . regexExp , * datePattern4 ) return eventBreakers }
Initializes a known set of log event breakers.
Initializes a known set of log event breakers .
//127.0.0.1 //2019-12-05 18:44:57 //[2019-12-05 18:44:57] //2019-12-05T18:44:57,007 //[2019-12-05T18:44:57,007+0000]