1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +02:00

Boot process logger message consistency and improvements

This commit is contained in:
Harvey Kandola 2018-09-14 13:00:58 +01:00
parent 2336dab69f
commit 4c733ce581
4 changed files with 12 additions and 8 deletions

View file

@ -30,7 +30,7 @@ var testHost string // used during automated testing
// Start router to handle all HTTP traffic.
func Start(rt *env.Runtime, s *domain.Store, ready chan struct{}) {
rt.Log.Info(fmt.Sprintf("Starting %s version %s", rt.Product.Title, rt.Product.Version))
rt.Log.Info(fmt.Sprintf("Edition: %s version %s", rt.Product.Title, rt.Product.Version))
// decide which mode to serve up
switch rt.Flags.SiteMode {
@ -47,7 +47,7 @@ func Start(rt *env.Runtime, s *domain.Store, ready chan struct{}) {
if err != nil {
rt.Log.Error("plugin setup failed", err)
}
rt.Log.Info("Starting web server")
rt.Log.Info("Web Server: starting up")
}
// define middleware
@ -88,7 +88,7 @@ func Start(rt *env.Runtime, s *domain.Store, ready chan struct{}) {
// start server
if !rt.Flags.SSLEnabled() {
rt.Log.Info("Starting non-SSL server on " + rt.Flags.HTTPPort)
rt.Log.Info("Web Server: binding non-SSL server on " + rt.Flags.HTTPPort)
if rt.Flags.SiteMode == env.SiteModeSetup {
rt.Log.Info("***")
rt.Log.Info(fmt.Sprintf("*** Go to http://localhost:%s/setup in your web browser and complete setup wizard ***", rt.Flags.HTTPPort))
@ -98,7 +98,7 @@ func Start(rt *env.Runtime, s *domain.Store, ready chan struct{}) {
n.Run(testHost + ":" + rt.Flags.HTTPPort)
} else {
if rt.Flags.ForceHTTPPort2SSL != "" {
rt.Log.Info("Starting non-SSL server on " + rt.Flags.ForceHTTPPort2SSL + " and redirecting to SSL server on " + rt.Flags.HTTPPort)
rt.Log.Info("Web Server: binding non-SSL server on " + rt.Flags.ForceHTTPPort2SSL + " and redirecting to SSL server on " + rt.Flags.HTTPPort)
go func() {
err := http.ListenAndServe(":"+rt.Flags.ForceHTTPPort2SSL, http.HandlerFunc(
@ -119,7 +119,7 @@ func Start(rt *env.Runtime, s *domain.Store, ready chan struct{}) {
rt.Log.Info("***")
}
rt.Log.Info("Starting SSL server on " + rt.Flags.HTTPPort + " with " + rt.Flags.SSLCertFile + " " + rt.Flags.SSLKeyFile)
rt.Log.Info("Web Server: starting SSL server on " + rt.Flags.HTTPPort + " with " + rt.Flags.SSLCertFile + " " + rt.Flags.SSLKeyFile)
// TODO: https://blog.gopheracademy.com/advent-2016/exposing-go-on-the-internet/