go.mod: update btclog dep

This bump includes a fix which prevents attribute value quoting if the
value string contains a newline character. This is so that if we call
spew.DumpS(), the output will stay nicely formatted.

The update also includes a couple more Hex helpers which we can make use
of now.
This commit is contained in:
Elle Mouton
2024-12-10 13:07:46 +02:00
parent dd25e6eb22
commit 4e0498faa4
3 changed files with 4 additions and 10 deletions

View File

@@ -122,11 +122,5 @@ func WithBuildInfo(ctx context.Context, cfg *LogConfig) (context.Context,
return nil, fmt.Errorf("unable to decode commit hash: %w", err)
}
// Include the first 3 bytes of the commit hash in the context as an
// slog attribute.
if len(commitHash) > 3 {
commitHash = commitHash[:3]
}
return btclog.WithCtx(ctx, btclog.Hex("rev", commitHash)), nil
return btclog.WithCtx(ctx, btclog.Hex3("rev", commitHash)), nil
}