Skip to content

Commit bbd7b8d

Browse files
committed
fix error format
1 parent 761daaf commit bbd7b8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

maintnotifications/e2e/utils_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ func min(a, b int) int {
5353
func printLog(group string, isError bool, format string, args ...interface{}) {
5454
_, filename, line, _ := runtime.Caller(2)
5555
filename = filepath.Base(filename)
56+
finalFormat := "%s:%d [%s][%s] " + format + "\n"
5657
if isError {
57-
format = "%s:%d [%s][%s][ERROR] " + format + "\n"
58+
finalFormat = "%s:%d [%s][%s][ERROR] " + format + "\n"
5859
}
59-
format = "%s:%d [%s][%s] " + format + "\n"
6060
ts := time.Now().Format("15:04:05.000")
6161
args = append([]interface{}{filename, line, ts, group}, args...)
62-
fmt.Printf(format, args...)
62+
fmt.Printf(finalFormat, args...)
6363
}

0 commit comments

Comments
 (0)