Skip to content

Commit

Permalink
chore: downgrade some logging from info to debug (ratify-project#1111)
Browse files Browse the repository at this point in the history
  • Loading branch information
akashsinghal authored Oct 9, 2023
1 parent b746162 commit 6d5a3cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion httpserver/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type contextHandler struct {
func (ch *contextHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
sanitizedMethod := utils.SanitizeString(r.Method)
sanitizedURL := utils.SanitizeURL(*r.URL)
logrus.Infof("received request %s %s ", sanitizedMethod, sanitizedURL)
logrus.Debugf("received request %s %s ", sanitizedMethod, sanitizedURL)
if err := ch.handler(ch.context, w, r); err != nil {
logrus.Errorf("request %s %s failed with error %v", sanitizedMethod, sanitizedURL, err)
if serveErr := errcode.ServeJSON(w, err); serveErr != nil {
Expand Down
4 changes: 2 additions & 2 deletions httpserver/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (server *Server) verify(ctx context.Context, w http.ResponseWriter, r *http
startTime := time.Now()
sanitizedMethod := utils.SanitizeString(r.Method)
sanitizedURL := utils.SanitizeURL(*r.URL)
logger.GetLogger(ctx, server.LogOption).Infof("start request %s %s", sanitizedMethod, sanitizedURL)
logger.GetLogger(ctx, server.LogOption).Debugf("start request %s %s", sanitizedMethod, sanitizedURL)

body, err := io.ReadAll(r.Body)
if err != nil {
Expand Down Expand Up @@ -142,7 +142,7 @@ func (server *Server) mutate(ctx context.Context, w http.ResponseWriter, r *http
startTime := time.Now()
sanitizedMethod := utils.SanitizeString(r.Method)
sanitizedURL := utils.SanitizeURL(*r.URL)
logger.GetLogger(ctx, server.LogOption).Infof("start request %s %s", sanitizedMethod, sanitizedURL)
logger.GetLogger(ctx, server.LogOption).Debugf("start request %s %s", sanitizedMethod, sanitizedURL)

body, err := io.ReadAll(r.Body)
if err != nil {
Expand Down

0 comments on commit 6d5a3cf

Please sign in to comment.