Mercurial > gemma
comparison cmd/gemma/main.go @ 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 | 5f47eeea988d |
children | 2dd155cc95ec |
comparison
equal
deleted
inserted
replaced
5492:b4f59aef3f9e | 5493:0cd4ff1066fe |
---|---|
48 auth.Sessions = ss | 48 auth.Sessions = ss |
49 } | 49 } |
50 | 50 |
51 func start(cmd *cobra.Command, args []string) { | 51 func start(cmd *cobra.Command, args []string) { |
52 | 52 |
53 config.Ready() | |
54 | |
55 if lf := config.LogFile(); lf != "" { | 53 if lf := config.LogFile(); lf != "" { |
56 log.SetupLog(lf, 0666) | 54 log.SetupLog(lf, 0666) |
57 defer log.ShutdownLog() | 55 defer log.ShutdownLog() |
58 } | 56 } |
59 | 57 |
60 log.SetLogLevel(config.LogLevel()) | 58 log.SetLogLevel(config.LogLevel()) |
59 | |
60 config.Ready() | |
61 | 61 |
62 web, err := filepath.Abs(config.Web()) | 62 web, err := filepath.Abs(config.Web()) |
63 if err != nil { | 63 if err != nil { |
64 log.Fatalf("%v\n", err) | 64 log.Fatalf("%v\n", err) |
65 } | 65 } |