Skip to content

Commit

Permalink
Change logrus to logger where possible
Browse files Browse the repository at this point in the history
Signed-off-by: Riyaz Faizullabhoy <[email protected]>
  • Loading branch information
riyazdf committed Jul 14, 2016
1 parent 824ab1b commit 4997ac1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/handlers/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func getHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, var
// of time.
utils.SetLastModifiedHeader(w.Header(), *lastModified)
} else {
logrus.Warnf("Got bytes out for %s's %s (checksum: %s), but missing lastModified date",
logger.Warnf("Got bytes out for %s's %s (checksum: %s), but missing lastModified date",
gun, tufRole, checksum)
}

Expand All @@ -159,15 +159,15 @@ func getHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, var

// DeleteHandler deletes all data for a GUN. A 200 responses indicates success.
func DeleteHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
vars := mux.Vars(r)
gun := vars["imageName"]
logger := ctxu.GetLoggerWithField(ctx, gun, "gun")
s := ctx.Value("metaStore")
store, ok := s.(storage.MetaStore)
if !ok {
logrus.Error("500 DELETE repository: no storage exists")
logger.Error("500 DELETE repository: no storage exists")
return errors.ErrNoStorage.WithDetail(nil)
}
vars := mux.Vars(r)
gun := vars["imageName"]
logger := ctxu.GetLoggerWithField(ctx, gun, "gun")
err := store.Delete(gun)
if err != nil {
logger.Error("500 DELETE repository")
Expand Down

0 comments on commit 4997ac1

Please sign in to comment.