Skip to content

Commit a58cf01

Browse files
committed
docs: change print
1 parent 6a85d4b commit a58cf01

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

pkg/grpc/metrics/connection.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package metrics
22

33
import (
4-
"fmt"
54
"net"
65
"sync"
76

@@ -75,9 +74,8 @@ func (l *CustomListener) Accept() (net.Conn, error) {
7574

7675
if l.zapLogger != nil {
7776
l.zapLogger.Info("new grpc client connected", zap.String("client", conn.RemoteAddr().String()), zap.Int("active connections", count))
78-
} else {
79-
fmt.Printf("new grpc client connected, client: %s, active connections: %d\n", conn.RemoteAddr().String(), count)
8077
}
78+
8179
if l.connectionGauge != nil {
8280
l.connectionGauge.Set(float64(count))
8381
}
@@ -105,9 +103,8 @@ func (l *CustomListener) closeConnection(clientAddr string) {
105103

106104
if l.zapLogger != nil {
107105
l.zapLogger.Info("grpc client disconnected", zap.String("client", clientAddr), zap.Int("active connections", count))
108-
} else {
109-
fmt.Printf("grpc client disconnected client: %s, active connections: %d\n", clientAddr, count)
110106
}
107+
111108
if l.connectionGauge != nil {
112109
l.connectionGauge.Set(float64(count))
113110
}

pkg/rabbitmq/producer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func NewProducer(exchange *Exchange, queueName string, connection *Connection, o
187187
return nil, err
188188
}
189189

190-
fields := logFields(queueName, exchange)
190+
fields := logFields(q.Name, exchange)
191191
fields = append(fields, zap.Bool("isPersistent", o.isPersistent))
192192

193193
// create dead letter exchange and queue if enabled

0 commit comments

Comments
 (0)