Improve logging to determine if 'operator' is frequent enough not to mess up PIS lookup for VSTP services
This commit is contained in:
parent
18dc87754b
commit
d557241107
@ -18,7 +18,7 @@ func processEntryType(entry database.Service) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func createEntry(entry database.Service) {
|
func createEntry(entry database.Service) {
|
||||||
log.Msg.Info("Entry Creation requested for: " + entry.TrainUid + " - " + entry.Headcode)
|
log.Msg.Info("Entry Creation requested for: " + entry.TrainUid + " - " + entry.Headcode + " - " + entry.Operator)
|
||||||
}
|
}
|
||||||
|
|
||||||
func deleteEntry(entry database.Service) {
|
func deleteEntry(entry database.Service) {
|
||||||
|
@ -15,7 +15,7 @@ var count uint64 = 0
|
|||||||
|
|
||||||
func handle(msg *stomp.Message) {
|
func handle(msg *stomp.Message) {
|
||||||
count++
|
count++
|
||||||
log.Msg.Info("Message count: " + fmt.Sprint(count))
|
log.Msg.Info("Messages since started: " + fmt.Sprint(count))
|
||||||
schedule := unmarshalData(string(msg.Body))
|
schedule := unmarshalData(string(msg.Body))
|
||||||
processEntryType(schedule)
|
processEntryType(schedule)
|
||||||
saveToFile(schedule, "transformed")
|
saveToFile(schedule, "transformed")
|
||||||
@ -37,5 +37,5 @@ func saveToFile(msg any, suffix string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Msg.Info("Saved message to: " + path)
|
log.Msg.Debug("Saved message to: " + path)
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ func Subscribe() {
|
|||||||
if msg.Err != nil {
|
if msg.Err != nil {
|
||||||
log.Msg.Error("STOMP Message Error: " + msg.Err.Error())
|
log.Msg.Error("STOMP Message Error: " + msg.Err.Error())
|
||||||
} else {
|
} else {
|
||||||
log.Msg.Debug("STOMP Message Received")
|
log.Msg.Info("STOMP Message Received")
|
||||||
saveToFile(string(msg.Body), "msgBody")
|
saveToFile(string(msg.Body), "msgBody")
|
||||||
handle(msg)
|
handle(msg)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user