diff --git a/plugin/plugins/peerlog/peerlog.go b/plugin/plugins/peerlog/peerlog.go index b5b78c086..39122df00 100644 --- a/plugin/plugins/peerlog/peerlog.go +++ b/plugin/plugins/peerlog/peerlog.go @@ -46,7 +46,9 @@ func (*peerLogPlugin) Init(*plugin.Environment) error { func (*peerLogPlugin) Start(node *core.IpfsNode) error { // Ensure logs from this plugin get printed regardless of global IPFS_LOGGING value - logging.SetLogLevel("plugin/peerlog", "info") + if err := logging.SetLogLevel("plugin/peerlog", "info"); err != nil { + return fmt.Errorf("failed to set log level: %w", err) + } var notifee network.NotifyBundle notifee.ConnectedF = func(net network.Network, conn network.Conn) { log.Infow("connected",