geut / discovery-swarm-webrtc

discovery-swarm for WebRTC
MIT License
94 stars 23 forks source link

Log fatal connection errors #12

Closed dboreham closed 4 years ago

dboreham commented 4 years ago

If there is some configuration error with the swarm (the one I ran into is where webrtc is available in the browser, but not by default in Node), it can be very hard to see what the problem is because even after enabling swarm debug output there is nothing logged that will tell you there's a problem. This change adds logging for the error event which will now display if debug output is enabled, allowing easy diagnosis of the config problem.