Skip to content

Commit 30d167e

Browse files
committed
code health: unify log messages format
The patch removes a last newline character from log messages because the character will be added anyway [1][2]. 1. https://pkg.go.dev/log#Logger.Printf 2. https://pkg.go.dev/log#Output Part of #119
1 parent 8cb6489 commit 30d167e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

connection.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ func (d defaultLogger) Report(event ConnLogKind, conn *Connection, v ...interfac
7777
case LogReconnectFailed:
7878
reconnects := v[0].(uint)
7979
err := v[1].(error)
80-
log.Printf("tarantool: reconnect (%d/%d) to %s failed: %s\n", reconnects, conn.opts.MaxReconnects, conn.addr, err.Error())
80+
log.Printf("tarantool: reconnect (%d/%d) to %s failed: %s", reconnects, conn.opts.MaxReconnects, conn.addr, err)
8181
case LogLastReconnectFailed:
8282
err := v[0].(error)
83-
log.Printf("tarantool: last reconnect to %s failed: %s, giving it up.\n", conn.addr, err.Error())
83+
log.Printf("tarantool: last reconnect to %s failed: %s, giving it up", conn.addr, err)
8484
case LogUnexpectedResultId:
8585
resp := v[0].(*Response)
8686
log.Printf("tarantool: connection %s got unexpected resultId (%d) in response", conn.addr, resp.RequestId)

0 commit comments

Comments
 (0)