Skip to content
Sean DuBois edited this page Nov 19, 2018 · 4 revisions

Summary

pion-WebRTC currently uses fmt.Println sprinkled through out the code base. For the most grievous errors we always print them, for warnings we usually comment them out (and then developers re-enable them locally)

This is a frustrating way to work for developers, and doesn't work at all for users. Developers just add fmt.Println messages throughout the code base. Users have it even worse, when they have an issue they don't know where to go next to debug their issue. We also have bug reports where a user just sees a message, but not sure what is happening. It turns out the message is informational and we debug.

Goals

  • Give pion-WebRTC maintainers a quicker way to debug/trace, without having to edit existing code
  • Allow pion-WebRTC embedders to capture logs, and store them in format that matches existing system (JSON etc...)
  • Allow logging on different levels/components (Trace+ICE) (Warning+SDP)

Existing Logging Solutions

I am hesitant to import an existing logging solution. It would be nice if we didn't import any non-Pion libraries, I would like to allow embedders to choose anything they want, and not steer them in a certain way.

Also it is nice that we aren't dependent on other people making changes we don't agree with/having to track other projects development. It seems like a lot of Open Source projects that just use a bunch of libraries fall into a trap of having to just follow everyone's release schedule.

Proposed Solutions

https://github.com/pions/webrtc/pull/223

https://github.com/pions/webrtc/pull/236

Clone this wiki locally