Set logging preferences via command line flags. Closes #20
This commit is contained in:
@@ -49,7 +49,7 @@ func (h *Handler) OnCreateStream(timestamp uint32, cmd *rtmpmsg.NetConnectionCre
|
||||
//OnPublish handles the "OnPublish" of the rtmp service
|
||||
func (h *Handler) OnPublish(timestamp uint32, cmd *rtmpmsg.NetStreamPublish) error {
|
||||
// log.Printf("OnPublish: %#v", cmd)
|
||||
log.Println("Incoming stream connected.")
|
||||
log.Trace("Incoming stream connected.")
|
||||
|
||||
if cmd.PublishingName != config.Config.VideoSettings.StreamingKey {
|
||||
return errors.New("invalid streaming key; rejecting incoming stream")
|
||||
|
||||
@@ -45,7 +45,7 @@ func Start() {
|
||||
},
|
||||
})
|
||||
|
||||
log.Printf("RTMP server is listening for incoming stream on port: %d", port)
|
||||
log.Infof("RTMP server is listening for incoming stream on port: %d", port)
|
||||
if err := srv.Serve(listener); err != nil {
|
||||
log.Panicf("Failed to serve the rtmp service: %+v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user