1
0
mirror of https://github.com/rancher/os.git synced 2025-05-30 18:35:17 +00:00
os/pkg/init/debug/debug.go

23 lines
446 B
Go
Raw Normal View History

2018-09-16 04:55:26 +00:00
package debug
import (
"github.com/rancher/os/config"
"github.com/rancher/os/pkg/log"
)
func PrintAndLoadConfig(_ *config.CloudConfig) (*config.CloudConfig, error) {
PrintConfig()
cfg := config.LoadConfig()
return cfg, nil
}
func PrintConfig() {
cfgString, err := config.Export(false, true)
if err != nil {
log.WithFields(log.Fields{"err": err}).Error("Error serializing config")
} else {
log.Debugf("Config: %s", cfgString)
}
}