Skip to content

Commit f07d02b

Browse files
committed
Remove new-line from sfu-ws logging
Fails lint_no_trailing_newline_in_log_messages check
1 parent 444132d commit f07d02b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sfu-ws/main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func signalPeerConnections() {
181181
return true
182182
}
183183

184-
log.Infof("Send offer to client: %v\n", offer)
184+
log.Infof("Send offer to client: %v", offer)
185185

186186
if err = peerConnections[i].websocket.WriteJSON(&websocketMessage{
187187
Event: "offer",
@@ -282,7 +282,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
282282
return
283283
}
284284

285-
log.Infof("Send candidate to client: %s\n", candidateString)
285+
log.Infof("Send candidate to client: %s", candidateString)
286286

287287
if writeErr := c.WriteJSON(&websocketMessage{
288288
Event: "candidate",
@@ -294,7 +294,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
294294

295295
// If PeerConnection is closed remove it from global list
296296
peerConnection.OnConnectionStateChange(func(p webrtc.PeerConnectionState) {
297-
log.Infof("Connection state change: %s\n", p)
297+
log.Infof("Connection state change: %s", p)
298298

299299
switch p {
300300
case webrtc.PeerConnectionStateFailed:
@@ -308,7 +308,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
308308
})
309309

310310
peerConnection.OnTrack(func(t *webrtc.TrackRemote, _ *webrtc.RTPReceiver) {
311-
log.Infof("Got remote track: Kind=%s, ID=%s, PayloadType=%d\n", t.Kind(), t.ID(), t.PayloadType())
311+
log.Infof("Got remote track: Kind=%s, ID=%s, PayloadType=%d", t.Kind(), t.ID(), t.PayloadType())
312312

313313
// Create a track to fan out our incoming video to all peers
314314
trackLocal := addTrack(t)
@@ -338,7 +338,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
338338
})
339339

340340
peerConnection.OnICEConnectionStateChange(func(is webrtc.ICEConnectionState) {
341-
log.Infof("ICE connection state changed: %s\n", is)
341+
log.Infof("ICE connection state changed: %s", is)
342342
})
343343

344344
// Signal for the new PeerConnection
@@ -367,7 +367,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
367367
return
368368
}
369369

370-
log.Infof("Got candidate: %v\n", candidate)
370+
log.Infof("Got candidate: %v", candidate)
371371

372372
if err := peerConnection.AddICECandidate(candidate); err != nil {
373373
log.Errorf("Failed to add ICE candidate: %v", err)
@@ -380,7 +380,7 @@ func websocketHandler(w http.ResponseWriter, r *http.Request) {
380380
return
381381
}
382382

383-
log.Infof("Got answer: %v\n", answer)
383+
log.Infof("Got answer: %v", answer)
384384

385385
if err := peerConnection.SetRemoteDescription(answer); err != nil {
386386
log.Errorf("Failed to set remote description: %v", err)

0 commit comments

Comments
 (0)