diff --git a/pkg/util/rpcdebug/interceptors.go b/pkg/util/rpcdebug/interceptors.go index e55c6f6cc3fd..e96c3e835844 100644 --- a/pkg/util/rpcdebug/interceptors.go +++ b/pkg/util/rpcdebug/interceptors.go @@ -58,9 +58,6 @@ func NewDebugInterceptor(opts DebugInterceptorOptions) (*DebugInterceptor, error i.mutex = &sync.Mutex{} } - if err := i.clearLogFile(); err != nil { - return nil, err - } return i, nil } @@ -154,13 +151,6 @@ func (i *DebugInterceptor) DebugStreamClientInterceptor(opts LogOptions) grpc.St } } -func (i *DebugInterceptor) clearLogFile() error { - i.mutex.Lock() - defer i.mutex.Unlock() - - return os.WriteFile(i.logFile, []byte{}, 0600) -} - func (i *DebugInterceptor) record(log debugInterceptorLogEntry) error { i.mutex.Lock() defer i.mutex.Unlock()