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 /cmd/gitaly-ssh
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 'cmd/gitaly-ssh')
-rw-r--r--cmd/gitaly-ssh/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/gitaly-ssh/main.go b/cmd/gitaly-ssh/main.go
index 5b1bf262f..b34e99f32 100644
--- a/cmd/gitaly-ssh/main.go
+++ b/cmd/gitaly-ssh/main.go
@@ -7,7 +7,6 @@ import (
"strconv"
"strings"
- "github.com/sirupsen/logrus"
gitalyauth "gitlab.com/gitlab-org/gitaly/v16/auth"
"gitlab.com/gitlab-org/gitaly/v16/internal/featureflag"
"gitlab.com/gitlab-org/gitaly/v16/internal/grpc/client"
@@ -87,7 +86,7 @@ func main() {
os.Exit(code)
}
-func (cmd gitalySSHCommand) run(logger logrus.FieldLogger) (int, error) {
+func (cmd gitalySSHCommand) run(logger log.Logger) (int, error) {
// Configure distributed tracing
closer := tracing.Initialize(tracing.WithServiceName("gitaly-ssh"))
defer closer.Close()
@@ -132,7 +131,7 @@ func (cmd gitalySSHCommand) run(logger logrus.FieldLogger) (int, error) {
return int(code), nil
}
-func getConnection(ctx context.Context, url string, registry *sidechannel.Registry, logger logrus.FieldLogger) (*grpc.ClientConn, error) {
+func getConnection(ctx context.Context, url string, registry *sidechannel.Registry, logger log.Logger) (*grpc.ClientConn, error) {
if url == "" {
return nil, fmt.Errorf("gitaly address can not be empty")
}