From 24548e87decbdfea38bbf692cecad6d4eefc3ec0 Mon Sep 17 00:00:00 2001 From: Flu0r1ne Date: Sun, 22 Aug 2021 23:27:53 -0500 Subject: Refactoring & Enhanced logging --- cmd/planr/main.go | 9 +++++++-- cmd/planr/sub/cli.go | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'cmd/planr') diff --git a/cmd/planr/main.go b/cmd/planr/main.go index 3c1c298..83a60bc 100644 --- a/cmd/planr/main.go +++ b/cmd/planr/main.go @@ -1,9 +1,11 @@ package main import ( - "os" - "io" "fmt" + "io" + "log" + "os" + "golang.flu0r1ne.net/planr/cmd/planr/sub" ) @@ -26,6 +28,9 @@ func dieUsage() { func main() { + log.SetFlags(log.Llongfile | log.Lmsgprefix) + log.SetPrefix("planr: ") + if len(os.Args) < 2 { dieUsage() } diff --git a/cmd/planr/sub/cli.go b/cmd/planr/sub/cli.go index dff9089..0e6a942 100644 --- a/cmd/planr/sub/cli.go +++ b/cmd/planr/sub/cli.go @@ -75,6 +75,8 @@ func tcStatusLine(tc planr.TestCase) { func tcPprint(tc planr.TestCase) { tcStatusLine(tc) + pprintLabeled("id", tc.Cname) + if tc.Config.Points != nil { points := fmt.Sprintf("%.1f", *tc.Config.Points) pprintLabeled("points", points) -- cgit v1.2.3