mirror of
https://github.com/owncast/owncast.git
synced 2024-11-24 05:38:58 +03:00
Standardize logging format
This commit is contained in:
parent
375be379b6
commit
e3d84f37ac
6 changed files with 13 additions and 9 deletions
|
@ -3,7 +3,8 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
|
|
@ -2,13 +2,14 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"math"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func showStreamOfflineState(configuration Config) {
|
||||
|
|
|
@ -3,10 +3,11 @@ package main
|
|||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"syscall"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/yutopp/go-flv"
|
||||
flvtag "github.com/yutopp/go-flv/tag"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
@ -62,7 +61,7 @@ func updateVariantPlaylist(fullPath string) {
|
|||
playlistBytes, err := ioutil.ReadFile(fullPath)
|
||||
verifyError(err)
|
||||
playlistString := string(playlistBytes)
|
||||
fmt.Println("Rewriting playlist", relativePath, "to", path.Join(configuration.PublicHLSPath, relativePath))
|
||||
// fmt.Println("Rewriting playlist", relativePath, "to", path.Join(configuration.PublicHLSPath, relativePath))
|
||||
|
||||
playlistString = storage.GenerateRemotePlaylist(playlistString, variant)
|
||||
|
||||
|
@ -79,7 +78,7 @@ func monitorVideoContent(pathToMonitor string, configuration Config, storage Chu
|
|||
} else {
|
||||
variants[0] = Variant{0, make([]Segment, 0)}
|
||||
}
|
||||
log.Printf("Using directory %s for storing files with %d variants...\n", pathToMonitor, len(variants))
|
||||
// log.Printf("Using directory %s for storing files with %d variants...\n", pathToMonitor, len(variants))
|
||||
|
||||
w := watcher.New()
|
||||
|
||||
|
@ -114,7 +113,7 @@ func monitorVideoContent(pathToMonitor string, configuration Config, storage Chu
|
|||
}()
|
||||
newObjectPath := <-newObjectPathChannel
|
||||
segment.RemoteID = newObjectPath
|
||||
fmt.Println("Uploaded", segment.RelativeUploadPath, "as", newObjectPath)
|
||||
// fmt.Println("Uploaded", segment.RelativeUploadPath, "as", newObjectPath)
|
||||
|
||||
variants[segment.VariantIndex].Segments = append(variants[segment.VariantIndex].Segments, segment)
|
||||
|
||||
|
|
|
@ -2,10 +2,11 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"golang.org/x/net/websocket"
|
||||
)
|
||||
|
||||
|
|
3
stats.go
3
stats.go
|
@ -11,10 +11,11 @@ package main
|
|||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"math"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type Stats struct {
|
||||
|
|
Loading…
Reference in a new issue