From 6d429ab5c196f07b57b140b5f0bc41c4bbf44423 Mon Sep 17 00:00:00 2001 From: Olgun Cengiz <olgun.cengiz@vereign.com> Date: Thu, 8 Nov 2018 11:00:43 +0300 Subject: [PATCH] config values are printed to log file --- server/configs.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/configs.go b/server/configs.go index 6c4cbb9..6a95ea4 100644 --- a/server/configs.go +++ b/server/configs.go @@ -27,4 +27,11 @@ func SetConfigValues() { if err := viper.ReadInConfig(); err != nil { log.Printf("can't read config: %s, will use default values", err) } + + // Print all config values to log file + log.Printf("All Settings From Config:") + as := viper.AllSettings() + for key, _ := range as { + log.Printf("%s => %s", key, viper.GetString(key)) + } } \ No newline at end of file -- GitLab