Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve logging #116

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Improve logging #116

merged 1 commit into from
Jul 26, 2023

Conversation

streamer45
Copy link
Contributor

Summary

We were missing potentially useful warnings from our logs that would ease debugging issues. Given Pion has an easy way to pass a proper logger we wrap our existing one so that everything can get printed out nicely.

Sample output:

info  [2023-07-25 16:09:31.866 -06:00] peer connection state changed: connected      caller="rtc/logger.go:70" origin="webrtc/v3.(*PeerConnection).onConnectionStateChange webrtc/peerconnection.go:495"
warn  [2023-07-25 16:09:31.867 -06:00] test warning                                  caller="rtc/logger.go:78" origin="webrtc/v3.(*PeerConnection).undeclaredMediaProcessor webrtc/peerconnection.go:1627"
error [2023-07-25 16:09:31.867 -06:00] test error                                    caller="rtc/logger.go:86" origin="webrtc/v3.(*PeerConnection).undeclaredMediaProcessor webrtc/peerconnection.go:1628"

@streamer45 streamer45 added the 2: Dev Review Requires review by a core committer label Jul 25, 2023
@streamer45 streamer45 added this to the v0.12.0 milestone Jul 25, 2023
@streamer45 streamer45 requested a review from cpoile July 25, 2023 22:15
@streamer45 streamer45 self-assigned this Jul 25, 2023
Copy link
Member

@cpoile cpoile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice, thanks!

@streamer45 streamer45 added 3: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Jul 26, 2023
@streamer45 streamer45 merged commit 03a45fc into master Jul 26, 2023
2 checks passed
@streamer45 streamer45 deleted the pion-logging branch July 26, 2023 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants