added server logging to file, added logging and formatting to info and lock commands
This commit is contained in:
@@ -40,6 +40,10 @@ func ValidateConfig(conf *GvcServerConfig, configPath string, version string) er
|
||||
fmt.Printf("No version found, inputing current server version: %s\n", version)
|
||||
conf.Version = version
|
||||
}
|
||||
if conf.LogFile == "" { // If no log file specified, set log location
|
||||
fmt.Printf("No logfile found in config, setting it to: gvclog.log :in root dir:")
|
||||
conf.LogFile = "gvclog.log"
|
||||
}
|
||||
if conf.RepoRootPath == "" {
|
||||
fmt.Println("Repo root path: ", conf.RepoRootPath)
|
||||
path, err := os.Getwd()
|
||||
|
@@ -4,6 +4,7 @@ import "github.com/deranjer/gvc/common"
|
||||
|
||||
// GvcServerConfig will hold the base server settings
|
||||
type GvcServerConfig struct {
|
||||
LogFile string `toml:"logfile"` // Where to store the echo logs
|
||||
Version string `toml:"version"` // The server version
|
||||
Port int `toml:"port"` // The port that the server will listed on
|
||||
BindIP string `toml:"ip"` // What IP to bind the server to. If empty will bind to all interfaces
|
||||
|
Reference in New Issue
Block a user