summaryrefslogtreecommitdiff
path: root/debugon.go
diff options
context:
space:
mode:
Diffstat (limited to 'debugon.go')
-rw-r--r--debugon.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/debugon.go b/debugon.go
index 302b0ec..ceb3c33 100644
--- a/debugon.go
+++ b/debugon.go
@@ -49,7 +49,11 @@ func (dp *debugParser) logf(ps *State, result *Result, format string, args ...in
if ps.Errored() {
buf.WriteString(fmt.Sprintf(" did not find %s", ps.Error.expected))
} else if result != nil {
- buf.WriteString(fmt.Sprintf(" found %s", result.String()))
+ resultStr := strconv.Quote(result.String())
+ if len(resultStr) > 20 {
+ resultStr = resultStr[0:20]
+ }
+ buf.WriteString(fmt.Sprintf(" found %s", resultStr))
}
buf.WriteRune('\n')
return buf.String()