fix: add some logging for goval-dictionary (#603)

This commit is contained in:
Kota Kanbe
2018-02-19 13:30:42 +09:00
committed by GitHub
parent 7a5793c562
commit 0653656526

View File

@@ -428,12 +428,17 @@ func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}
}
if c.Conf.OvalDBURL != "" {
util.Log.Infof("oval-dictionary: %s", c.Conf.OvalDBURL)
err := oval.Base{}.CheckHTTPHealth()
if err != nil {
util.Log.Errorf("OVAL HTTP server is not running. err: %s", err)
util.Log.Errorf("Run goval-dictionary as server mode before reporting or run with -ovaldb-path option")
return subcommands.ExitFailure
}
} else {
if c.Conf.OvalDBType == "sqlite3" {
util.Log.Infof("oval-dictionary: %s", c.Conf.OvalDBPath)
}
}
var res models.ScanResults