From bded77fe18a8acb6397835a836ac68f7435bf3d4 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Tue, 21 May 2019 22:04:19 -0400 Subject: runtime bugs re: http400 and database reading on startup --- init.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'init.go') diff --git a/init.go b/init.go index b898ae8..a6b2aa1 100644 --- a/init.go +++ b/init.go @@ -114,9 +114,17 @@ func initConfig() { confObj.port = viper.GetInt("port") confObj.logFile = viper.GetString("logFile") confObj.dbPath = viper.GetString("databasePath") + log.Printf("Using database: %v\n", confObj.dbPath) confObj.stdoutLogging = viper.GetBool("stdoutLogging") + if confObj.stdoutLogging { + log.Printf("Logging to stdout\n") + } else { + log.Printf("Logging to %v\n", confObj.logFile) + } confObj.cacheInterval = dur + log.Printf("Cache refresh interval: %v\n", dur) confObj.dbInterval = dbDur + log.Printf("Database push interval: %v\n", dbDur) confObj.lastCache = thetime confObj.lastPush = thetime confObj.version = getwtxt -- cgit 1.4.1-2-gfad0