0
owncast/config/config.go
tomleb 1504ea3509
Add -logdir flag (#1039)
This allow configuring the various logs that may be outputted
(transcoder and future logs)
2021-05-22 16:29:49 -07:00

49 lines
1.4 KiB
Go

package config
import (
"path/filepath"
"fmt"
)
// These are runtime-set values used for configuration.
// 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
// VersionNumber is the current version string.
var VersionNumber = StaticVersionNumber
// WebServerPort is the port for Owncast's webserver that is used for this execution of the service.
var WebServerPort = 8080
// InternalHLSListenerPort is the port for HLS writes that is used for this execution of the service.
var InternalHLSListenerPort = "8927"
// ConfigFilePath is the path to the config file for migration.
var ConfigFilePath = "config.yaml"
// GitCommit is an optional commit this build was made from.
var GitCommit = ""
// BuildPlatform is the optional platform this release was built for.
var BuildPlatform = "dev"
// GetReleaseString gets the version string.
func GetReleaseString() string {
var versionNumber = VersionNumber
var buildPlatform = BuildPlatform
var gitCommit = GitCommit
return fmt.Sprintf("Owncast v%s-%s (%s)", versionNumber, buildPlatform, gitCommit)
}
func GetTranscoderLogFilePath() string {
return filepath.Join(LogDirectory, "transcoder.log")
}