File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11{
2- "version" : " v0.44 .0"
2+ "version" : " v0.45 .0"
33}
You can’t perform that action at this time.
0 commit comments