summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2019-07-31 17:45:05 +0200
committerJan Dittberner <jandd@cacert.org>2019-07-31 17:45:05 +0200
commit6ff78cde48cd7866a1bd3047ced807d31e243da2 (patch)
tree1f3da81c9232869c470459bb2d66ed625e7c3477
parent41a8261552d9922da3a5759f6d0c1f856c95c2ce (diff)
downloadcacert-boardvoting-6ff78cde48cd7866a1bd3047ced807d31e243da2.tar.gz
cacert-boardvoting-6ff78cde48cd7866a1bd3047ced807d31e243da2.tar.xz
cacert-boardvoting-6ff78cde48cd7866a1bd3047ced807d31e243da2.zip
Initialize logger with timestamps0.5.0
-rw-r--r--boardvoting.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/boardvoting.go b/boardvoting.go
index 7817bd3..7228849 100644
--- a/boardvoting.go
+++ b/boardvoting.go
@@ -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()