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:
authorJohn Cai <jcai@gitlab.com>2020-05-15 03:27:22 +0300
committerJohn Cai <jcai@gitlab.com>2020-05-15 03:27:22 +0300
commit0048fc5549942d6cbe08fbf1630f084b356b48db (patch)
treedd65998061adbefd0396363237be8925119b609b
parentf54ee715e237709e722a009ae4a3622425f9b8ae (diff)
parenta4d09b042f8f745dfaac5ad76a13a8a11dabbe1a (diff)
Merge branch 'fix_subcommand_logging' into 'master'
Configure logging before running sub-commands Closes #2500 See merge request gitlab-org/gitaly!2169
-rw-r--r--changelogs/unreleased/fix_subcommand_logging.yml5
-rw-r--r--cmd/praefect/main.go4
2 files changed, 7 insertions, 2 deletions
diff --git a/changelogs/unreleased/fix_subcommand_logging.yml b/changelogs/unreleased/fix_subcommand_logging.yml
new file mode 100644
index 000000000..51151e403
--- /dev/null
+++ b/changelogs/unreleased/fix_subcommand_logging.yml
@@ -0,0 +1,5 @@
+---
+title: Configure logging before running sub-commands
+merge_request: 2169
+author:
+type: fixed
diff --git a/cmd/praefect/main.go b/cmd/praefect/main.go
index 448198fb7..009734f0d 100644
--- a/cmd/praefect/main.go
+++ b/cmd/praefect/main.go
@@ -145,6 +145,8 @@ func main() {
os.Exit(1)
}
+ conf.ConfigureLogger()
+
if args := flag.Args(); len(args) > 0 {
os.Exit(subCommand(conf, args[0], args[1:]))
}
@@ -188,8 +190,6 @@ func initConfig() (config.Config, error) {
}
func configure(conf config.Config) {
- conf.ConfigureLogger()
-
tracing.Initialize(tracing.WithServiceName(progname))
if conf.PrometheusListenAddr != "" {