Skip to content

Commit

Permalink
Clean up unneeded debug logs
Browse files Browse the repository at this point in the history
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
  • Loading branch information
sleshchenko committed May 27, 2020
1 parent 2540d1b commit 92d7e24
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion activity/manager.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2012-2019 Red Hat, Inc.
// Copyright (c) 2012-2020 Red Hat, Inc.
// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
3 changes: 0 additions & 3 deletions auth/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ package auth
import (
restUtil "github.com/eclipse/che-machine-exec/common/rest"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
"net/http"
"strings"
)
Expand All @@ -28,14 +27,12 @@ const (
func extractToken(c *gin.Context) (string, error) {
token := c.Request.Header.Get(AccessTokenHeader)
if token != "" {
logrus.Debug("Access token is found " + token)
token = strings.TrimSuffix(token, "Bearer ")
return token, nil
}

token = c.Request.Header.Get(ForwardedAccessTokenHeader)
if token != "" {
logrus.Debug("Forwarded access token is found. " + token)
return token, nil
}

Expand Down
2 changes: 0 additions & 2 deletions common/rest/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ func WriteResponse(c *gin.Context, httpStatus int, message string) {

func WriteErrorResponse(c *gin.Context, err error) {
if v, ok := err.(HttpError); ok {
logrus.Debug("it's http error. Sending " + string(v.code))
c.Writer.WriteHeader(v.code)
} else {
logrus.Debug("it isn't http error. Sending 500")
c.Writer.WriteHeader(http.StatusInternalServerError)
}

Expand Down

0 comments on commit 92d7e24

Please sign in to comment.