go.mod+build: update btclog dep

This commit is contained in:
Elle Mouton committed 2024-11-27 10:44:01 +02:00
1 parent c8cfa59316
commit b98fc168ec
5 files changed
+33 -8

No files matched your search

+13
View File
@@ -108,6 +108,19 @@ func (h *handlerSet) Level() btclogv1.Level {
return h.level
}
// WithPrefix returns a copy of the Handler but with the given string prefixed
// to each log message.
//
// NOTE: this is part of the btclog.Handler interface.
func (h *handlerSet) WithPrefix(prefix string) btclog.Handler {
newSet := &handlerSet{set: make([]btclog.Handler, len(h.set))}
for i, handler := range h.set {
newSet.set[i] = handler.WithPrefix(prefix)
}
return newSet
}
// A compile-time check to ensure that handlerSet implements btclog.Handler.
var _ btclog.Handler = (*handlerSet)(nil)