diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2021-08-04 08:43:43 +0000 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2021-08-04 08:43:43 +0000 |
commit | 7b44ce1d4a0716d27acabb4f826eb5613dade082 (patch) | |
tree | 51a9edeb92dbb8743ae1927f62d8d86cde0e861a /cmd/gitlab-sshd | |
parent | df0138b5f0f8f998a832c6c063128f56d1953604 (diff) | |
parent | 1274858f5565d59dcc36813964334a21fffc369b (diff) | |
download | gitlab-shell-7b44ce1d4a0716d27acabb4f826eb5613dade082.tar.gz |
Merge branch '499-use-labkit-logging-initialize' into 'main'
Switch to labkit for logging system setup
Closes #271
See merge request gitlab-org/gitlab-shell!504
Diffstat (limited to 'cmd/gitlab-sshd')
-rw-r--r-- | cmd/gitlab-sshd/acceptance_test.go | 2 | ||||
-rw-r--r-- | cmd/gitlab-sshd/main.go | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/cmd/gitlab-sshd/acceptance_test.go b/cmd/gitlab-sshd/acceptance_test.go index 7cb1c48..922ee5e 100644 --- a/cmd/gitlab-sshd/acceptance_test.go +++ b/cmd/gitlab-sshd/acceptance_test.go @@ -229,7 +229,7 @@ func startSSHD(t *testing.T, dir string) string { t.Cleanup(func() { pw.Close() }) scanner := bufio.NewScanner(pr) - extractor := regexp.MustCompile(`tcp_address="([0-9a-f\[\]\.:]+)"`) + extractor := regexp.MustCompile(`"tcp_address":"([0-9a-f\[\]\.:]+)"`) ctx, cancel := context.WithCancel(context.Background()) cmd := exec.CommandContext(ctx, sshdPath, "-config-dir", dir) diff --git a/cmd/gitlab-sshd/main.go b/cmd/gitlab-sshd/main.go index 78690b0..5bbf221 100644 --- a/cmd/gitlab-sshd/main.go +++ b/cmd/gitlab-sshd/main.go @@ -63,7 +63,8 @@ func main() { cfg.ApplyGlobalState() - logger.ConfigureStandalone(cfg) + logCloser := logger.ConfigureStandalone(cfg) + defer logCloser.Close() ctx, finished := command.Setup("gitlab-sshd", cfg) defer finished() |