From bfd37e39c5470e43e9b1af9a147c5b1d7fd01d44 Mon Sep 17 00:00:00 2001 From: davidjmccann Date: Mon, 12 Sep 2022 09:43:59 +0100 Subject: [PATCH] Update logging.go Prevent attempting to directly print strings that may contain embedded percent characters. --- cmd/runmqserver/logging.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/runmqserver/logging.go b/cmd/runmqserver/logging.go index 3e196c9..b13ed99 100644 --- a/cmd/runmqserver/logging.go +++ b/cmd/runmqserver/logging.go @@ -1,5 +1,5 @@ /* -© Copyright IBM Corporation 2017, 2021 +© Copyright IBM Corporation 2017, 2022 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -165,7 +165,7 @@ func configureLogger(name string) (mirrorFunc, error) { if err != nil { log.Printf("Failed to unmarshall JSON in log message - %v", err) } else { - fmt.Printf(formatBasic(obj)) + fmt.Print(formatBasic(obj)) } } else { // The log being mirrored isn't JSON, so just print it.