mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
multi: optimize loggings around changes from blockbeat
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package lnutils
|
||||
|
||||
import "github.com/davecgh/go-spew/spew"
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
// LogClosure is used to provide a closure over expensive logging operations so
|
||||
// don't have to be performed when the logging level doesn't warrant it.
|
||||
@@ -25,3 +29,10 @@ func SpewLogClosure(a any) LogClosure {
|
||||
return spew.Sdump(a)
|
||||
}
|
||||
}
|
||||
|
||||
// NewSeparatorClosure returns a new closure that logs a separator line.
|
||||
func NewSeparatorClosure() LogClosure {
|
||||
return func() string {
|
||||
return strings.Repeat("=", 80)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user