Skip to content

Commit

Permalink
[LogCollector] Log request to delete project logs (#5667)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranbg committed Jun 2, 2024
1 parent b799702 commit c735ff2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/log-collector/pkg/services/logcollector/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,10 @@ func (s *Server) DeleteLogs(ctx context.Context, request *protologcollector.Stop
// if no run uids were provided, delete the entire project's logs
if len(request.RunUIDs) == 0 {

s.Logger.DebugWithCtx(ctx,
"Deleting all project logs",
"project", request.Project)

// remove entire project from persistent state
if err := s.deleteProjectLogs(request.Project); err != nil {
message := fmt.Sprintf("Failed to delete project logs for project %s", request.Project)
Expand All @@ -607,6 +611,10 @@ func (s *Server) DeleteLogs(ctx context.Context, request *protologcollector.Stop
}, errors.Wrap(err, message)
}

s.Logger.DebugWithCtx(ctx,
"Successfully deleted all project logs",
"project", request.Project)

return s.successfulBaseResponse(), nil
}

Expand Down

0 comments on commit c735ff2

Please sign in to comment.