fix(plugin): check log error

This commit is contained in:
Steven Allen 2020-02-10 13:09:00 -08:00
parent 58e52f351d
commit 15085fd1a3

View File

@ -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",