improve listener labels (#5635)

add a label after every "listener opened on :XXX" message that mentions
protocols of every listener.
This commit is contained in:
Alessandro Ros
2026-04-03 16:35:31 +02:00
committed by GitHub
parent 4ed821add0
commit f453b59cd6
8 changed files with 52 additions and 11 deletions
+7 -1
View File
@@ -179,7 +179,13 @@ func (a *API) Initialize() error {
return err
}
a.Log(logger.Info, "listener opened on "+a.Address)
str := "listener opened on " + a.Address
if !a.Encryption {
str += " (TCP/HTTP)"
} else {
str += " (TCP/HTTPS)"
}
a.Log(logger.Info, str)
return nil
}
+7 -1
View File
@@ -122,7 +122,13 @@ func (m *Metrics) Initialize() error {
return err
}
m.Log(logger.Info, "listener opened on "+m.Address)
str := "listener opened on " + m.Address
if !m.Encryption {
str += " (TCP/HTTP)"
} else {
str += " (TCP/HTTPS)"
}
m.Log(logger.Info, str)
return nil
}
+7 -1
View File
@@ -66,7 +66,13 @@ func (s *Server) Initialize() error {
return err
}
s.Log(logger.Info, "listener opened on "+s.Address)
str := "listener opened on " + s.Address
if !s.Encryption {
str += " (TCP/HTTP)"
} else {
str += " (TCP/HTTPS)"
}
s.Log(logger.Info, str)
return nil
}
+7 -1
View File
@@ -69,7 +69,13 @@ func (pp *PPROF) Initialize() error {
return err
}
pp.Log(logger.Info, "listener opened on "+pp.Address)
str := "listener opened on " + pp.Address
if !pp.Encryption {
str += " (TCP/HTTP)"
} else {
str += " (TCP/HTTPS)"
}
pp.Log(logger.Info, str)
return nil
}
+7 -1
View File
@@ -138,7 +138,13 @@ func (s *Server) Initialize() error {
return err
}
s.Log(logger.Info, "listener opened on "+s.Address)
str := "listener opened on " + s.Address
if !s.Encryption {
str += " (TCP/HTTP)"
} else {
str += " (TCP/HTTPS)"
}
s.Log(logger.Info, str)
s.wg.Add(1)
go s.run()
+7 -1
View File
@@ -145,7 +145,13 @@ func (s *Server) Initialize() error {
s.chAPIConnsGet = make(chan serverAPIConnsGetReq)
s.chAPIConnsKick = make(chan serverAPIConnsKickReq)
s.Log(logger.Info, "listener opened on %s", s.Address)
str := "listener opened on " + s.Address
if s.IsTLS {
str += " (TCP/RTMPS)"
} else {
str += " (TCP/RTMP)"
}
s.Log(logger.Info, str)
l := &listener{
ln: s.ln,
+8 -3
View File
@@ -306,12 +306,17 @@ func (s *Server) Initialize() error {
}
}
str := "listener opened on " + s.Address + " (HTTP)"
str := "listener opened on " + s.Address
if !s.Encryption {
str += " (TCP/HTTP)"
} else {
str += " (TCP/HTTPS)"
}
if s.udpMuxLn != nil {
str += ", " + s.LocalUDPAddress + " (ICE/UDP)"
str += ", " + s.LocalUDPAddress + " (UDP/ICE)"
}
if s.tcpMuxLn != nil {
str += ", " + s.LocalTCPAddress + " (ICE/TCP)"
str += ", " + s.LocalTCPAddress + " (TCP/ICE)"
}
s.Log(logger.Info, str)