Skip to content

Commit

Permalink
Logging tweaked a bit
Browse files Browse the repository at this point in the history
Dump of device quirks slightly tweaked
  • Loading branch information
alexpevzner committed Dec 11, 2024
1 parent 0a9fec8 commit 56e2696
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion usbtransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,18 @@ ERROR:
func (transport *UsbTransport) dumpQuirks(log *LogMessage) {
log.Debug(' ', "Device quirks:")

prevMatch := ""
for _, q := range transport.quirks.All() {
val := q.RawValue
if _, isStr := q.Parsed.(string); isStr {
val = strconv.Quote(val)
}

log.Debug(' ', " [%s]", q.Match)
if q.Match != prevMatch {
prevMatch = q.Match
log.Debug(' ', " [%s]", q.Match)
}

log.Debug(' ', " ; (%s)", q.Origin)
log.Debug(' ', " %s = %s", q.Name, val)
}
Expand Down

0 comments on commit 56e2696

Please sign in to comment.