Skip to content

Commit bfd37e3

Browse files
committed
Update logging.go
Prevent attempting to directly print strings that may contain embedded percent characters.
1 parent 3adb91d commit bfd37e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/runmqserver/logging.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
© Copyright IBM Corporation 2017, 2021
2+
© Copyright IBM Corporation 2017, 2022
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -165,7 +165,7 @@ func configureLogger(name string) (mirrorFunc, error) {
165165
if err != nil {
166166
log.Printf("Failed to unmarshall JSON in log message - %v", err)
167167
} else {
168-
fmt.Printf(formatBasic(obj))
168+
fmt.Print(formatBasic(obj))
169169
}
170170
} else {
171171
// The log being mirrored isn't JSON, so just print it.

0 commit comments

Comments
 (0)