Skip to content

Commit 511383f

Browse files
committed
chore: fixed non-constant format string in Printf call
1 parent da8aa56 commit 511383f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

bluemix/http/transport.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (r *TraceLoggingTransport) dumpRequest(req *http.Request, start time.Time)
5555

5656
dumpedRequest, err := httputil.DumpRequest(req, shouldDisplayBody)
5757
if err != nil {
58-
trace.Logger.Printf(T("An error occurred while dumping request:\n{{.Error}}\n", map[string]interface{}{"Error": err.Error()}))
58+
trace.Logger.Print(T("An error occurred while dumping request:\n{{.Error}}\n", map[string]interface{}{"Error": err.Error()}))
5959
return
6060
}
6161

@@ -76,7 +76,7 @@ func (r *TraceLoggingTransport) dumpResponse(res *http.Response, start time.Time
7676

7777
dumpedResponse, err := httputil.DumpResponse(res, shouldDisplayBody)
7878
if err != nil {
79-
trace.Logger.Printf(T("An error occurred while dumping response:\n{{.Error}}\n", map[string]interface{}{"Error": err.Error()}))
79+
trace.Logger.Print(T("An error occurred while dumping response:\n{{.Error}}\n", map[string]interface{}{"Error": err.Error()}))
8080
return
8181
}
8282

bluemix/trace/trace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func NewFileLogger(path string) PrinterCloser {
8787
file, err := os.OpenFile(filepath.Clean(path), os.O_CREATE|os.O_RDWR|os.O_APPEND, 0600)
8888
if err != nil {
8989
logger := NewStdLogger()
90-
logger.Printf(T("An error occurred when creating log file '{{.Path}}':\n{{.Error}}\n\n", map[string]interface{}{"Path": path, "Error": err.Error()}))
90+
logger.Print(T("An error occurred when creating log file '{{.Path}}':\n{{.Error}}\n\n", map[string]interface{}{"Path": path, "Error": err.Error()}))
9191
return logger
9292
}
9393
return newLoggerImpl(file, "", 0)

0 commit comments

Comments
 (0)