Browse Source

Silence some logging

pull/5/head
Gabe Kangas 5 years ago
parent
commit
cbe37d68ce
  1. 3
      client.go
  2. 2
      ffmpeg.go
  3. 7
      stats.go

3
client.go

@ -3,7 +3,6 @@ package main
import ( import (
"fmt" "fmt"
"io" "io"
"log"
"golang.org/x/net/websocket" "golang.org/x/net/websocket"
) )
@ -73,7 +72,7 @@ func (c *Client) listenWrite() {
// send message to the client // send message to the client
case msg := <-c.ch: case msg := <-c.ch:
msg.MessageType = "CHAT" msg.MessageType = "CHAT"
log.Println("Send:", msg) // log.Println("Send:", msg)
websocket.JSON.Send(c.ws, msg) websocket.JSON.Send(c.ws, msg)
// receive done request // receive done request

2
ffmpeg.go

@ -159,7 +159,7 @@ func startFfmpeg(configuration Config) {
ffmpegCmd := "cat " + pipePath + " | " + configuration.FFMpegPath + " " + ffmpegFlagsString ffmpegCmd := "cat " + pipePath + " | " + configuration.FFMpegPath + " " + ffmpegFlagsString
fmt.Println(ffmpegCmd) // fmt.Println(ffmpegCmd)
_, err := exec.Command("sh", "-c", ffmpegCmd).Output() _, err := exec.Command("sh", "-c", ffmpegCmd).Output()
fmt.Println(err) fmt.Println(err)

7
stats.go

@ -10,7 +10,6 @@ package main
import ( import (
"encoding/json" "encoding/json"
"fmt"
"io/ioutil" "io/ioutil"
"log" "log"
"math" "math"
@ -89,9 +88,9 @@ func (s *Stats) GetOverallMaxViewerCount() int {
} }
func (s *Stats) SetClientActive(clientID string) { func (s *Stats) SetClientActive(clientID string) {
if _, ok := s.clients[clientID]; !ok { // if _, ok := s.clients[clientID]; !ok {
fmt.Println("Marking client active:", clientID, s.GetViewerCount()+1, "clients connected.") // fmt.Println("Marking client active:", clientID, s.GetViewerCount()+1, "clients connected.")
} // }
s.clients[clientID] = time.Now() s.clients[clientID] = time.Now()
s.SessionMaxViewerCount = int(math.Max(float64(s.GetViewerCount()), float64(s.SessionMaxViewerCount))) s.SessionMaxViewerCount = int(math.Max(float64(s.GetViewerCount()), float64(s.SessionMaxViewerCount)))

Loading…
Cancel
Save