1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

feat(logging): replace all the loggers with zerolog EE-4186 (#7663)

This commit is contained in:
andres-portainer 2022-09-16 13:18:44 -03:00 committed by GitHub
parent 53025178ef
commit 36e7981ab7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 1101 additions and 662 deletions

View file

@ -2,14 +2,15 @@ package auth
import (
"errors"
"log"
"net/http"
"github.com/asaskevich/govalidator"
httperror "github.com/portainer/libhttp/error"
"github.com/portainer/libhttp/request"
portainer "github.com/portainer/portainer/api"
httperrors "github.com/portainer/portainer/api/http/errors"
"github.com/asaskevich/govalidator"
"github.com/rs/zerolog/log"
)
type oauthPayload struct {
@ -71,7 +72,8 @@ func (handler *Handler) validateOAuth(w http.ResponseWriter, r *http.Request) *h
username, err := handler.authenticateOAuth(payload.Code, &settings.OAuthSettings)
if err != nil {
log.Printf("[DEBUG] - OAuth authentication error: %s", err)
log.Debug().Err(err).Msg("OAuth authentication error")
return httperror.InternalServerError("Unable to authenticate through OAuth", httperrors.ErrUnauthorized)
}