From 0fba5f70e2035319226502e714fd4f4f132bd0e5 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 3 Aug 2023 20:54:56 -0700 Subject: [PATCH] feat(video): add IP address to RTMP logs. Closes #3212 (#3233) --- core/rtmp/rtmp.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/rtmp/rtmp.go b/core/rtmp/rtmp.go index b9a4f96dd..0d71321bc 100644 --- a/core/rtmp/rtmp.go +++ b/core/rtmp/rtmp.go @@ -73,7 +73,7 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) { } if _hasInboundRTMPConnection { - log.Errorln("stream already running; can not overtake an existing stream") + log.Errorln("stream already running; can not overtake an existing stream from", nc.RemoteAddr().String()) _ = nc.Close() return } @@ -94,14 +94,14 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) { } if !accessGranted { - log.Errorln("invalid streaming key; rejecting incoming stream") + log.Errorln("invalid streaming key; rejecting incoming stream from", nc.RemoteAddr().String()) _ = nc.Close() return } rtmpOut, rtmpIn := io.Pipe() _pipe = rtmpIn - log.Infoln("Inbound stream connected.") + log.Infoln("Inbound stream connected from", nc.RemoteAddr().String()) _setStreamAsConnected(rtmpOut) _hasInboundRTMPConnection = true