diff --git a/app.go b/app.go index dec0ef28..c52f59d5 100644 --- a/app.go +++ b/app.go @@ -486,9 +486,14 @@ func ConnectToDatabase(app *App) error { return nil } +// FormatVersion constructs the version string for the application +func FormatVersion() string { + return serverSoftware + " " + softwareVer +} + // OutputVersion prints out the version of the application. func OutputVersion() { - fmt.Println(serverSoftware + " " + softwareVer) + fmt.Println(FormatVersion()) } // NewApp creates a new app instance. diff --git a/cmd/writefreely/main.go b/cmd/writefreely/main.go index 10cd7d67..48993c7d 100644 --- a/cmd/writefreely/main.go +++ b/cmd/writefreely/main.go @@ -113,6 +113,7 @@ func main() { // Initialize the application var err error + log.Info("Starting %s...", writefreely.FormatVersion()) app, err = writefreely.Initialize(app, *debugPtr) if err != nil { log.Error("%s", err)