Skip to content

Commit

Permalink
Do not clearLogFile as that clobbers preview traces
Browse files Browse the repository at this point in the history
  • Loading branch information
t0yv0 committed Nov 8, 2022
1 parent 909672a commit 1e7c1a0
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/util/rpcdebug/interceptors.go
Expand Up @@ -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
}

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 1e7c1a0

Please sign in to comment.