fix(plugin): check log error
Steven Allen committed
Feb 10, 2020 at 13:09 UTC
15085fd1a3104f48c384bc94771769f642fd330d
1 file changed
+3
-1
plugin/plugins/peerlog/peerlog.go
+3
-1
@@ -46,7 +46,9 @@ func (*peerLogPlugin) Init(*plugin.Environment) error {
46
47
func (*peerLogPlugin) Start(node *core.IpfsNode) error {
48
// Ensure logs from this plugin get printed regardless of global IPFS_LOGGING value
49
- logging.SetLogLevel("plugin/peerlog", "info")
49
+ if err := logging.SetLogLevel("plugin/peerlog", "info"); err != nil {
50
+ return fmt.Errorf("failed to set log level: %w", err)
51
+ }
52
var notifee network.NotifyBundle
53
notifee.ConnectedF = func(net network.Network, conn network.Conn) {
54
log.Infow("connected",