Add roomID to logger util (#345)

This commit is contained in:
Raja Subramanian
2022-01-17 16:36:10 +05:30
committed by GitHub
parent 629dae0f84
commit f662119ca4
6 changed files with 84 additions and 13 deletions
+2 -2
View File
@@ -357,7 +357,7 @@ func (r *RoomManager) rtcSessionWorker(room *rtc.Room, participant types.LocalPa
defer rtc.Recover()
pLogger := rtc.LoggerWithParticipant(
rtc.LoggerWithRoom(logger.Logger(logger.GetLogger()), room.Name()),
rtc.LoggerWithRoom(logger.Logger(logger.GetLogger()), room.Name(), room.ID()),
participant.Identity(), participant.ID(),
)
@@ -398,7 +398,7 @@ func (r *RoomManager) handleRTCMessage(_ context.Context, roomName livekit.RoomN
participant := room.GetParticipant(identity)
pLogger := rtc.LoggerWithParticipant(
rtc.LoggerWithRoom(logger.Logger(logger.GetLogger()), roomName),
rtc.LoggerWithRoom(logger.Logger(logger.GetLogger()), roomName, room.ID()),
identity,
"",
)
+1 -1
View File
@@ -147,7 +147,7 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
pLogger := rtc.LoggerWithParticipant(
rtc.LoggerWithRoom(logger.Logger(logger.GetLogger()), roomName),
rtc.LoggerWithRoom(logger.Logger(logger.GetLogger()), roomName, ""),
pi.Identity, "",
)
done := make(chan struct{})