Skip to content

Commit

Permalink
Reforctored errors in certs
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <[email protected]>
  • Loading branch information
nyagamunene committed Apr 23, 2024
1 parent 63cc5a5 commit 0419892
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions certs/api/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (lm *loggingMiddleware) IssueCert(ctx context.Context, token, thingID, ttl
}
if err != nil {
args = append(args, slog.Any("error", err))
lm.logger.Warn("Issue certificate failed to complete successfully", args...)
lm.logger.Error("Issue certificate failed to complete successfully", args...)
return
}
lm.logger.Info("Issue certificate completed successfully", args...)
Expand Down Expand Up @@ -121,7 +121,7 @@ func (lm *loggingMiddleware) RevokeCert(ctx context.Context, token, thingID stri
}
if err != nil {
args = append(args, slog.Any("error", err))
lm.logger.Warn("Revoke certificate failed to complete successfully", args...)
lm.logger.Error("Revoke certificate failed to complete successfully", args...)
return
}
lm.logger.Info("Revoke certificate completed successfully", args...)
Expand Down

0 comments on commit 0419892

Please sign in to comment.