Skip to content

Commit d0ecbf9

Browse files
MarcoPololidel
andauthored
Release v0.45.0 (#3424)
Co-authored-by: Marcin Rataj <[email protected]>
1 parent 3f09fa4 commit d0ecbf9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

gologshim/gologshim.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,19 @@
1313
//
1414
// Applications can optionally connect go-libp2p to go-log by calling SetDefaultHandler:
1515
//
16+
// import golog "github.com/ipfs/go-log/v2"
17+
//
1618
// func init() {
17-
// gologshim.SetDefaultHandler(slog.Default().Handler())
19+
// gologshim.SetDefaultHandler(golog.SlogHandler())
1820
// }
1921
//
2022
// When integrated, go-libp2p logs use go-log's formatting and can be controlled
2123
// programmatically via go-log's SetLogLevel("subsystem", "level") API to adjust
2224
// log verbosity per subsystem at runtime without restarting.
2325
//
26+
// Note: SlogHandler() works even when GOLOG_CAPTURE_DEFAULT_SLOG=false, making
27+
// it more reliable than using slog.Default().Handler().
28+
//
2429
// # Standalone Usage
2530
//
2631
// Without calling SetDefaultHandler, gologshim creates standalone slog handlers

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "v0.44.0"
2+
"version": "v0.45.0"
33
}

0 commit comments

Comments
 (0)