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) {
|
||||
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) {
|
||||
|
@ -15,7 +15,7 @@ var count uint64 = 0
|
||||
|
||||
func handle(msg *stomp.Message) {
|
||||
count++
|
||||
log.Msg.Info("Message count: " + fmt.Sprint(count))
|
||||
log.Msg.Info("Messages since started: " + fmt.Sprint(count))
|
||||
schedule := unmarshalData(string(msg.Body))
|
||||
processEntryType(schedule)
|
||||
saveToFile(schedule, "transformed")
|
||||
@ -37,5 +37,5 @@ func saveToFile(msg any, suffix string) {
|
||||
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 {
|
||||
log.Msg.Error("STOMP Message Error: " + msg.Err.Error())
|
||||
} else {
|
||||
log.Msg.Debug("STOMP Message Received")
|
||||
log.Msg.Info("STOMP Message Received")
|
||||
saveToFile(string(msg.Body), "msgBody")
|
||||
handle(msg)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user