Improve logging to determine if 'operator' is frequent enough not to mess up PIS lookup for VSTP services

This commit is contained in:
Fred Boniface 2023-07-21 14:40:24 +01:00
parent 18dc87754b
commit d557241107
3 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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)
}

View File

@ -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)
}