summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go3
-rw-r--r--lib/textui/log.go3
-rw-r--r--lib/textui/log_test.go2
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go b/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go
index 80db817..63a0d16 100644
--- a/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go
+++ b/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go
@@ -109,7 +109,8 @@ type itemStats struct {
}
func (s itemStats) String() string {
- return textui.Sprintf("%v (queued %v augments and %v failures across %v trees)",
+ // return textui.Sprintf("%v (queued %v augments and %v failures across %v trees)",
+ return textui.Sprintf("%v (aug:%v fail:%v trees:%v)",
s.Portion, s.NumAugments, s.NumFailures, s.NumAugmentTrees)
}
diff --git a/lib/textui/log.go b/lib/textui/log.go
index 8327b67..110e1aa 100644
--- a/lib/textui/log.go
+++ b/lib/textui/log.go
@@ -180,7 +180,7 @@ func (l *logger) log(lvl dlog.LogLevel, writeMsg func(io.Writer)) {
// time ////////////////////////////////////////////////////////////////
now := time.Now()
- const timeFmt = "2006-01-02 15:04:05.0000"
+ const timeFmt = "15:04:05.0000"
logBuf.WriteString(timeFmt)
now.AppendFormat(logBuf.Bytes()[:0], timeFmt)
@@ -372,6 +372,7 @@ func writeField(w io.Writer, key string, val any) {
if strings.HasPrefix(valStr, "/main/") {
valStr = strings.TrimPrefix(valStr, "/main")
}
+ valStr = strings.TrimPrefix(valStr, "/")
}
case strings.HasSuffix(name, ".pass"):
fmt.Fprintf(w, "/pass-%s", valStr)
diff --git a/lib/textui/log_test.go b/lib/textui/log_test.go
index 514d96e..bcd9c39 100644
--- a/lib/textui/log_test.go
+++ b/lib/textui/log_test.go
@@ -16,7 +16,7 @@ import (
)
func logLineRegexp(inner string) string {
- return `[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{4} ` + inner + ` \(from lib/textui/log_test\.go:[0-9]+\)\n`
+ return `[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{4} ` + inner + ` \(from lib/textui/log_test\.go:[0-9]+\)\n`
}
func TestLogFormat(t *testing.T) {