diff --git a/server/http_server/http_server.go b/server/http_server/http_server.go index 652ee68..a5430f5 100644 --- a/server/http_server/http_server.go +++ b/server/http_server/http_server.go @@ -2,6 +2,7 @@ package http_server import ( "fmt" + log "github.com/sirupsen/logrus" "io/fs" "net/http" "pmail/config" @@ -28,6 +29,8 @@ func HttpStart() { HttpPort = config.Instance.HttpPort } + log.Infof("HttpServer Start On Port :%d", HttpPort) + if config.Instance.HttpsEnabled != 2 { mux.HandleFunc("/", controllers.Interceptor) httpServer = &http.Server{ diff --git a/server/http_server/https_server.go b/server/http_server/https_server.go index d8d3cda..7d9e466 100644 --- a/server/http_server/https_server.go +++ b/server/http_server/https_server.go @@ -34,7 +34,6 @@ func (w *nullWrite) Write(p []byte) (int, error) { } func HttpsStart() { - log.Infof("Http Server Start") mux := http.NewServeMux() @@ -73,6 +72,8 @@ func HttpsStart() { HttpsPort = config.Instance.HttpsPort } + log.Infof("Https Server Start On Port :%d", HttpsPort) + if config.Instance.HttpsEnabled != 2 { httpsServer = &http.Server{ Addr: fmt.Sprintf(":%d", HttpsPort), diff --git a/server/res_init/init.go b/server/res_init/init.go index 0043ae2..68f7826 100644 --- a/server/res_init/init.go +++ b/server/res_init/init.go @@ -1,6 +1,7 @@ package res_init import ( + "encoding/json" log "github.com/sirupsen/logrus" "os" "pmail/config" @@ -39,6 +40,10 @@ func Init() { // http server start go http_server.HttpsStart() go http_server.HttpStart() + + configStr, _ := json.Marshal(config.Instance) + log.Warnf("Config File Info: %s", configStr) + <-signal.RestartChan log.Infof("Server Restart!") smtp_server.Stop()