Initialize logger with timestamps 0.5.0
authorJan Dittberner <jandd@cacert.org>
Wed, 31 Jul 2019 15:45:05 +0000 (17:45 +0200)
committerJan Dittberner <jandd@cacert.org>
Wed, 31 Jul 2019 15:45:05 +0000 (17:45 +0200)
boardvoting.go

index 7817bd3..7228849 100644 (file)
@@ -821,14 +821,13 @@ func setupTLSConfig() (tlsConfig *tls.Config) {
        return
 }
 
-func init() {
-       flag.StringVar(
-               &configFile, "config", "config.yaml", "Configuration file name")
-}
-
 func main() {
+       log.SetFormatter(&log.TextFormatter{FullTimestamp: true})
        log.Infof("CAcert Board Voting version %s, build %s", version, build)
 
+       flag.StringVar(
+               &configFile, "config", "config.yaml", "Configuration file name")
+
        flag.Parse()
 
        var stopAll func()