Add -logdir flag (#1039)
This allow configuring the various logs that may be outputted (transcoder and future logs)
This commit is contained in:
5
main.go
5
main.go
@@ -37,6 +37,7 @@ func main() {
|
||||
|
||||
configFile := flag.String("configFile", "config.yaml", "Config file path to migrate to the new database")
|
||||
dbFile := flag.String("database", "", "Path to the database file.")
|
||||
logDirectory := flag.String("logdir", "", "Directory where logs will be written to")
|
||||
enableDebugOptions := flag.Bool("enableDebugFeatures", false, "Enable additional debugging options.")
|
||||
enableVerboseLogging := flag.Bool("enableVerboseLogging", false, "Enable additional logging.")
|
||||
restoreDatabaseFile := flag.String("restoreDatabase", "", "Restore an Owncast database backup")
|
||||
@@ -58,6 +59,10 @@ func main() {
|
||||
}
|
||||
log.Infoln(config.GetReleaseString())
|
||||
|
||||
if *logDirectory != "" {
|
||||
config.LogDirectory = *logDirectory
|
||||
}
|
||||
|
||||
// Create the data directory if needed
|
||||
if !utils.DoesFileExists("data") {
|
||||
os.Mkdir("./data", 0700)
|
||||
|
||||
Reference in New Issue
Block a user