Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-14 17:59:12 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-15 13:37:43 +0300
commit2a006c4ee8b47887ddc1274dab9f645caf679c41 (patch)
treef8ff40264468d2c643ffad109201f95e1a01fa6c /internal/gitlab/client
parent47bcacea13a24cc3712900de3b2039d8efbce7f9 (diff)
log: Wrap the logrus logger
Introduce a wrapper for the logrus logging infrastructure. This is a first step towards abstracting away the actual implementation of our logs behind a type that we can iterate on and will thus pave the way towards adoption of the `slog` package. Note that this is only one step of this transition. The interface does not yet roundtrip to itself, e.g. calling `log.Logger.WithError()` will result in a `logrus.Entry`, not in a `log.Logger`. This will be handled at a later point.
Diffstat (limited to 'internal/gitlab/client')
-rw-r--r--internal/gitlab/client/gitlabnet.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/gitlab/client/gitlabnet.go b/internal/gitlab/client/gitlabnet.go
index 127797d94..bde1a6f8f 100644
--- a/internal/gitlab/client/gitlabnet.go
+++ b/internal/gitlab/client/gitlabnet.go
@@ -12,6 +12,7 @@ import (
"github.com/golang-jwt/jwt/v5"
"github.com/sirupsen/logrus"
+ "gitlab.com/gitlab-org/gitaly/v16/internal/log"
)
const (
@@ -29,7 +30,7 @@ type ErrorResponse struct {
//nolint:revive // This is unintentionally missing documentation.
type GitlabNetClient struct {
- logger logrus.FieldLogger
+ logger log.Logger
httpClient *HTTPClient
user string
password string
@@ -52,7 +53,7 @@ func (e *APIError) Error() string {
//nolint:revive // This is unintentionally missing documentation.
func NewGitlabNetClient(
- logger logrus.FieldLogger,
+ logger log.Logger,
user,
password,
secret string,