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

@@ -1,6 +1,7 @@
package config
import (
"path/filepath"
"fmt"
)
@@ -9,6 +10,9 @@ import (
// DatabaseFilePath is the path to the file ot be used as the global database for this run of the application.
var DatabaseFilePath = "data/owncast.db"
// LogDirectory is the path to various log files
var LogDirectory = "."
// EnableDebugFeatures will print additional data to help in debugging.
var EnableDebugFeatures = false
@@ -38,3 +42,7 @@ func GetReleaseString() string {
return fmt.Sprintf("Owncast v%s-%s (%s)", versionNumber, buildPlatform, gitCommit)
}
func GetTranscoderLogFilePath() string {
return filepath.Join(LogDirectory, "transcoder.log")
}