This commit is contained in:
shoopea 2019-12-29 21:02:20 +08:00
parent d7e9e01ad4
commit 1bd81e81f9

View File

@ -37,8 +37,7 @@ func resetMsgParsingRules2() error {
if err != nil {
return err
}
b, _ := json.Marshal(r2)
log.Printf("Rule : %s\n", string(b))
rules2 = append(rules2, r2)
}
@ -57,15 +56,10 @@ func resetMsgParsingRules2() error {
defer stmt.Close()
for _, r2 := range rules2 {
b, err := json.Marshal(r2)
log.Printf("Rule2 : %s\n", string(b))
_, err = stmt.Exec(r2.Priority, r2.MsgTypeID64, r2.Description, r2.Rule)
logOnError(err, "resetMsgParsingRules2 : insert statement "+r2.Description)
if err != nil {
return err
} else {
log.Printf("Inserting : %d : %s => %s (%d)\n", r2.Priority, r2.Description, r2.MsgType, r2.MsgTypeID64)
}
}