contractcourt: add verbose logging in resolvers

We now put the outpoint in the resolvers's logging so it's easier to
debug.
This commit is contained in:
yyforyongyu
2024-06-20 21:56:52 +08:00
parent 0bab6b3419
commit 1f2cfc6a60
6 changed files with 44 additions and 31 deletions

View File

@@ -120,8 +120,10 @@ func newContractResolverKit(cfg ResolverConfig) *contractResolverKit {
}
// initLogger initializes the resolver-specific logger.
func (r *contractResolverKit) initLogger(resolver ContractResolver) {
logPrefix := fmt.Sprintf("%T(%v):", resolver, r.ChanPoint)
func (r *contractResolverKit) initLogger(prefix string) {
logPrefix := fmt.Sprintf("ChannelArbitrator(%v): %s:", r.ChanPoint,
prefix)
r.log = log.WithPrefix(logPrefix)
}