changeset 5493:0cd4ff1066fe logging

Signal config readiness after logging is configured.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 20 Sep 2021 18:14:02 +0200
parents b4f59aef3f9e
children fb532459eb2e
files cmd/gemma/main.go
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cmd/gemma/main.go	Mon Sep 20 18:09:38 2021 +0200
+++ b/cmd/gemma/main.go	Mon Sep 20 18:14:02 2021 +0200
@@ -50,8 +50,6 @@
 
 func start(cmd *cobra.Command, args []string) {
 
-	config.Ready()
-
 	if lf := config.LogFile(); lf != "" {
 		log.SetupLog(lf, 0666)
 		defer log.ShutdownLog()
@@ -59,6 +57,8 @@
 
 	log.SetLogLevel(config.LogLevel())
 
+	config.Ready()
+
 	web, err := filepath.Abs(config.Web())
 	if err != nil {
 		log.Fatalf("%v\n", err)