Skip to content

Commit

Permalink
Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
luneo7 committed Apr 27, 2020
1 parent d004845 commit d34a471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func postMessageToExchange(amqpURI string, dirToPost string, newExchange string)
return fmt.Errorf("Publish %s: %s", filePath, err)
}

fmt.Println("Message Published")
fmt.Printf("Message Published:%s\n", filePath)
}

return nil
Expand Down Expand Up @@ -361,7 +361,6 @@ func dumpMessagesFromQueue(amqpURI string, queueName string, maxMessages uint, o

if containsNeeded == containsFound {
ackMessage = true
fmt.Printf("Acked msg-%04d\n", messagesReceived)
msgsToAck.Messages = append(msgsToAck.Messages[:i], msgsToAck.Messages[i+1:]...)
break
}
Expand All @@ -371,6 +370,7 @@ func dumpMessagesFromQueue(amqpURI string, queueName string, maxMessages uint, o

if ackMessage {
msg.Ack(false)
fmt.Printf("Acked msg-%04d\n", messagesReceived)
}

err = saveMessageToFile(msg, outputDir, messagesReceived, isContentJSON, ackMessage)
Expand Down

0 comments on commit d34a471

Please sign in to comment.