diff --git a/server.go b/server.go index dd0947f..1db0afc 100644 --- a/server.go +++ b/server.go @@ -74,6 +74,8 @@ func (s *server) Start() error { s.stopChan = make(chan struct{}) + logging.Logger().Info(fmt.Sprintf("Server[%s] is started", s.sh.GetName())) + s.sh.OnStart() s.stopWg.Add(1) @@ -89,7 +91,10 @@ func (s *server) Stop() { close(s.stopChan) s.stopWg.Wait() s.stopChan = nil + s.sh.OnStop() + + logging.Logger().Info(fmt.Sprintf("Server[%s] is stopped", s.sh.GetName())) } func handleServer(s *server) {