mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 00:44:12 +00:00
clean up logs and imports (#400)
This commit is contained in:
@@ -204,7 +204,7 @@ func NewRTCClient(conn *websocket.Conn) (*RTCClient, error) {
|
||||
c.publisher.OnOffer(c.onOffer)
|
||||
|
||||
c.subscriber.PeerConnection().OnICEConnectionStateChange(func(connectionState webrtc.ICEConnectionState) {
|
||||
logger.Infow("subscriber ICE state has changed", "state", connectionState.String(),
|
||||
logger.Debugw("subscriber ICE state has changed", "state", connectionState.String(),
|
||||
"participant", c.localParticipant.Identity)
|
||||
if connectionState == webrtc.ICEConnectionStateConnected {
|
||||
// flush peers
|
||||
@@ -571,7 +571,7 @@ func (c *RTCClient) GetPublishedTrackIDs() []string {
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
var trackIDs []string
|
||||
for key, _ := range c.localTracks {
|
||||
for key := range c.localTracks {
|
||||
trackIDs = append(trackIDs, key)
|
||||
}
|
||||
return trackIDs
|
||||
|
||||
@@ -53,7 +53,7 @@ func (w *TrackWriter) Start() error {
|
||||
return err
|
||||
}
|
||||
|
||||
logger.Infow("starting track writer",
|
||||
logger.Debugw("starting track writer",
|
||||
"track", w.track.ID(),
|
||||
"mime", w.mime)
|
||||
switch w.mime {
|
||||
@@ -110,7 +110,7 @@ func (w *TrackWriter) writeOgg() {
|
||||
}
|
||||
pageData, pageHeader, err := w.ogg.ParseNextPage()
|
||||
if err == io.EOF {
|
||||
logger.Infow("all audio samples parsed and sent")
|
||||
logger.Debugw("all audio samples parsed and sent")
|
||||
w.onWriteComplete()
|
||||
return
|
||||
}
|
||||
@@ -144,7 +144,7 @@ func (w *TrackWriter) writeVP8() {
|
||||
}
|
||||
frame, _, err := w.ivf.ParseNextFrame()
|
||||
if err == io.EOF {
|
||||
logger.Infow("all video frames parsed and sent")
|
||||
logger.Debugw("all video frames parsed and sent")
|
||||
w.onWriteComplete()
|
||||
return
|
||||
}
|
||||
|
||||
@@ -4,9 +4,10 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
)
|
||||
|
||||
func TestMultiNodeRoomList(t *testing.T) {
|
||||
|
||||
+3
-2
@@ -5,12 +5,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
testclient "github.com/livekit/livekit-server/test/client"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
testclient "github.com/livekit/livekit-server/test/client"
|
||||
)
|
||||
|
||||
// a scenario with lots of clients connecting, publishing, and leaving at random periods
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
@@ -16,6 +15,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/thoas/go-funk"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
testclient "github.com/livekit/livekit-server/test/client"
|
||||
|
||||
Reference in New Issue
Block a user