summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorFlu0r1ne <flur01ne@flu0r1ne.net>2021-08-22 23:27:53 -0500
committerFlu0r1ne <flur01ne@flu0r1ne.net>2021-08-22 23:27:53 -0500
commit24548e87decbdfea38bbf692cecad6d4eefc3ec0 (patch)
tree4f5d1432d1e22a1f19ceabbc92dcdd86bed98017 /cmd
parent5d33040ab80b5cce7883b2e5965aa17db2e6515a (diff)
downloaddeb-planr-24548e87decbdfea38bbf692cecad6d4eefc3ec0.tar.xz
deb-planr-24548e87decbdfea38bbf692cecad6d4eefc3ec0.zip
Refactoring & Enhanced logging
Diffstat (limited to 'cmd')
-rw-r--r--cmd/planr/main.go9
-rw-r--r--cmd/planr/sub/cli.go2
2 files changed, 9 insertions, 2 deletions
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)