From e4a89123e02b9d58591116624f42812dd25fb542 Mon Sep 17 00:00:00 2001 From: Liz Rice Date: Thu, 31 Aug 2017 17:38:11 +0100 Subject: [PATCH] =?UTF-8?q?Move=20message=20about=20which=20config=20file?= =?UTF-8?q?=20we=E2=80=99re=20using=20into=20a=20log=20at=20the=20start?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/common.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/common.go b/cmd/common.go index 14f2998..3708d1f 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -19,6 +19,7 @@ import ( "io/ioutil" "github.com/aquasecurity/kube-bench/check" + "github.com/golang/glog" "github.com/spf13/viper" ) @@ -54,6 +55,8 @@ func runChecks(t check.NodeType) { var err error var typeConf *viper.Viper + glog.V(1).Info(fmt.Sprintf("Using config file: %s\n", viper.ConfigFileUsed())) + switch t { case check.MASTER: file = masterFile @@ -131,8 +134,6 @@ func colorPrint(state check.State, s string) { // prettyPrint outputs the results to stdout in human-readable format func prettyPrint(r *check.Controls, summary check.Summary) { - colorPrint(check.INFO, fmt.Sprintf("Using config file: %s\n", viper.ConfigFileUsed())) - colorPrint(check.INFO, fmt.Sprintf("%s %s\n", r.ID, r.Text)) for _, g := range r.Groups { colorPrint(check.INFO, fmt.Sprintf("%s %s\n", g.ID, g.Text))