This commit is contained in:
shoopea 2019-05-13 10:27:03 +08:00
parent a3961fcab6
commit 247d1d4867

View File

@ -80,7 +80,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
}
if i == len(msgParsingRules) {
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Can't find message type in rules(%d)\n%s\n", objId, m.Text)
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Can't find message type in rules(%d)\n%s\n", objId, m.Text)
} else {
r := msgParsingRules[i].re
switch msgParsingRules[i].MsgTypeID {
@ -176,7 +176,12 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
*/
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : MATCHED!\nLoot1: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), m.Text)
if (len(r.ReplaceAllString(m.Text, "${Loot1}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot1}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot2}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot2}")) > 11) {
(len(r.ReplaceAllString(m.Text, "${Loot2}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot2}")) > 11)/* ||
(len(r.ReplaceAllString(m.Text, "${Loot3}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot3}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot4}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot4}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot5}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot5}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot6}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot6}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot7}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot7}")) > 11) */{
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : NOT MATCHED \nLoot1: %s\nLoot2: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Loot2}"), m.Text)
}
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : MATCHED!\nLoot1: %s\nLoot2: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Loot2}"), m.Text)