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:
authorJames Fargher <proglottis@gmail.com>2021-06-09 23:58:10 +0300
committerJames Fargher <jfargher@gitlab.com>2021-06-15 08:30:30 +0300
commit07048ea21953131d5022ab3289ec695e0cce4af7 (patch)
tree5290e378a8c07027cba466f1884c2702f59979fb /cmd/gitaly-wrapper
parentb541a391a9eebc7a0b85e37fcf12e8c5bf1be5e1 (diff)
Extract typed environment variable helpers
These helpers should make parsing typed environment variables more consistent.
Diffstat (limited to 'cmd/gitaly-wrapper')
-rw-r--r--cmd/gitaly-wrapper/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/gitaly-wrapper/main.go b/cmd/gitaly-wrapper/main.go
index 1239d4503..3ac422070 100644
--- a/cmd/gitaly-wrapper/main.go
+++ b/cmd/gitaly-wrapper/main.go
@@ -13,6 +13,7 @@ import (
"github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/gitaly/v14/internal/bootstrap"
+ "gitlab.com/gitlab-org/gitaly/v14/internal/helper/env"
"gitlab.com/gitlab-org/gitaly/v14/internal/log"
"gitlab.com/gitlab-org/gitaly/v14/internal/ps"
"golang.org/x/sys/unix"
@@ -177,5 +178,6 @@ func pidFile() string {
}
func jsonLogging() bool {
- return os.Getenv(envJSONLogging) == "true"
+ enabled, _ := env.GetBool(envJSONLogging, false)
+ return enabled
}