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:
+7
-1
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user