test
This commit is contained in:
parent
d7e9e01ad4
commit
1bd81e81f9
8
rules.go
8
rules.go
@ -37,8 +37,7 @@ func resetMsgParsingRules2() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
b, _ := json.Marshal(r2)
|
|
||||||
log.Printf("Rule : %s\n", string(b))
|
|
||||||
rules2 = append(rules2, r2)
|
rules2 = append(rules2, r2)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,15 +56,10 @@ func resetMsgParsingRules2() error {
|
|||||||
defer stmt.Close()
|
defer stmt.Close()
|
||||||
for _, r2 := range rules2 {
|
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)
|
_, err = stmt.Exec(r2.Priority, r2.MsgTypeID64, r2.Description, r2.Rule)
|
||||||
logOnError(err, "resetMsgParsingRules2 : insert statement "+r2.Description)
|
logOnError(err, "resetMsgParsingRules2 : insert statement "+r2.Description)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
|
||||||
log.Printf("Inserting : %d : %s => %s (%d)\n", r2.Priority, r2.Description, r2.MsgType, r2.MsgTypeID64)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user