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:
3 files changed
+4
-10
No files matched your search
+1
-7
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user