diff --git a/sql.go b/sql.go index a942734..ca1e347 100644 --- a/sql.go +++ b/sql.go @@ -3,6 +3,7 @@ package main import ( "errors" "log" + "regexp" "strconv" ) @@ -287,6 +288,8 @@ func loadMsgParsingRules() (map[int]MessageParsingRule, error) { msgTypeID int32 ) + log.Println("Loading message parsing rules...") + m := make(map[int]MessageParsingRule) count := int(0) @@ -307,6 +310,7 @@ func loadMsgParsingRules() (map[int]MessageParsingRule, error) { i.Description = descn i.Rule = rule i.MsgTypeID = msgTypeID + i.re = regexp.MustCompile(rule) m[count] = *i count++