Skip to content

Commit 315a36e

Browse files
Disable Debug Logs
1 parent 7fb9ab4 commit 315a36e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

pkg/util/logging/amds_log_hook.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ func (h *AmdsGrpcHook) Fire(entry *logrus.Entry) error {
9696
// The log was successfully queued.
9797
default:
9898
// The buffer is full. We drop the log.
99-
fmt.Printf("==> gRPC HOOK [CLIENT]: Log buffer is full. Dropping log message: %s\n", logEntry.Message)
10099
h.resetLogEntry(logEntry)
101100
h.entryPool.Put(logEntry)
102101
}
@@ -122,7 +121,6 @@ func (h *AmdsGrpcHook) processLogQueue() {
122121

123122
err := h.stream.Send(logEntry)
124123
if err != nil {
125-
fmt.Printf("==> gRPC HOOK [CLIENT]: Failed to send log, connection likely lost. Closing stream. Error: %v\n", err)
126124
h.closeStream()
127125
}
128126
h.mu.Unlock()
@@ -156,25 +154,21 @@ func (h *AmdsGrpcHook) connect() error {
156154
}
157155
h.lastConnectionAttempt = time.Now()
158156

159-
fmt.Printf("==> gRPC HOOK [CLIENT]: Attempting to connect to gRPC server at %s\n", grpcServerAddress)
160157
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
161158
defer cancel()
162159

163160
conn, err := grpc.DialContext(ctx, grpcServerAddress, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock())
164161
if err != nil {
165-
fmt.Printf("==> gRPC HOOK [CLIENT]: Connection attempt failed: %v\n", err)
166162
return fmt.Errorf("did not connect: %w", err)
167163
}
168164

169165
client := logsproto.NewVeleroLogStreamerClient(conn)
170166
stream, err := client.StreamLogs(context.Background())
171167
if err != nil {
172168
conn.Close()
173-
fmt.Printf("==> gRPC HOOK [CLIENT]: Failed to create log stream after connecting: %v\n", err)
174169
return fmt.Errorf("failed to create log stream: %w", err)
175170
}
176171

177-
fmt.Println("==> gRPC HOOK [CLIENT]: Successfully connected and established stream.")
178172
h.conn = conn
179173
h.stream = stream
180174
return nil
@@ -190,5 +184,4 @@ func (h *AmdsGrpcHook) closeStream() {
190184
h.conn.Close()
191185
h.conn = nil
192186
}
193-
fmt.Println("==> gRPC HOOK [CLIENT]: Stream and connection closed.")
194187
}

0 commit comments

Comments
 (0)