Add -logdir flag (#1039)

This allow configuring the various logs that may be outputted
(transcoder and future logs)
This commit is contained in:
tomleb
2021-05-22 19:29:49 -04:00
committed by GitHub
parent e311cb53ea
commit 1504ea3509
3 changed files with 16 additions and 3 deletions

View File

@ -101,7 +101,7 @@ func (t *Transcoder) Start() {
err = _commandExec.Start()
if err != nil {
log.Errorln("Transcoder error. See transcoder.log for full output to debug.")
log.Errorln("Transcoder error. See ", config.GetTranscoderLogFilePath(), " for full output to debug.")
log.Panicln(err, command)
}
@ -119,7 +119,7 @@ func (t *Transcoder) Start() {
}
if err != nil {
log.Errorln("transcoding error. look at transcoder.log to help debug. your copy of ffmpeg may not support your selected codec of", t.codec.Name(), "https://owncast.online/docs/troubleshooting/#codecs")
log.Errorln("transcoding error. look at ", config.GetTranscoderLogFilePath(), " to help debug. your copy of ffmpeg may not support your selected codec of", t.codec.Name(), "https://owncast.online/docs/troubleshooting/#codecs")
}
}
@ -142,7 +142,7 @@ func (t *Transcoder) getString() string {
hlsOptionsString = "-hls_flags " + strings.Join(hlsOptionFlags, "+")
}
ffmpegFlags := []string{
`FFREPORT=file="transcoder.log":level=32`,
fmt.Sprintf(`FFREPORT=file="%s":level=32`, config.GetTranscoderLogFilePath()),
t.ffmpegPath,
"-hide_banner",
"-loglevel warning",