From b228193ef1315b16d12dce9fbb79f8868c34a687 Mon Sep 17 00:00:00 2001 From: Allenxuxu <120582243@qq.com> Date: Wed, 6 Nov 2019 21:42:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20log=20=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.go b/server.go index 8dc7cc1..a8db439 100644 --- a/server.go +++ b/server.go @@ -8,6 +8,7 @@ import ( "github.com/Allenxuxu/gev/connection" "github.com/Allenxuxu/gev/eventloop" "github.com/Allenxuxu/gev/listener" + "github.com/Allenxuxu/gev/log" "github.com/Allenxuxu/toolkit/sync" "github.com/RussellLuo/timingwheel" "golang.org/x/sys/unix" @@ -113,6 +114,7 @@ func (s *Server) Start() { } sw.AddAndRun(s.loop.RunLoop) + log.Infof("Server start (%s)", s.opts.Address) sw.Wait() } @@ -124,6 +126,7 @@ func (s *Server) Stop() { for k := range s.workLoops { _ = s.workLoops[k].Stop() } + log.Info("Server stop") } // Options 返回 options