1
0
mirror of https://github.com/rancher/os.git synced 2025-09-02 07:15:41 +00:00

Redo logging so its a little more capable

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-07-12 23:58:38 +10:00
parent bf98a1ae3f
commit 0ccc5ad735
7 changed files with 215 additions and 111 deletions

View File

@@ -55,7 +55,15 @@ func loadRawConfig(dirPrefix string, full bool) map[interface{}]interface{} {
}
func LoadConfig() *CloudConfig {
return LoadConfigWithPrefix("")
cfg := LoadConfigWithPrefix("")
if cfg.Rancher.Debug {
log.SetDefaultLevel(log.DebugLevel)
} else {
log.SetDefaultLevel(log.InfoLevel)
}
return cfg
}
func LoadConfigWithPrefix(dirPrefix string) *CloudConfig {