Permalink
Browse files

Add logging

  • Loading branch information...
rosylilly committed Oct 22, 2017
1 parent cebf615 commit d8572203b0e266088f8fe37ebcf4628f27a230bb
Showing with 8 additions and 0 deletions.
  1. +3 −0 isubata/proxy/src/isuroxy/main.go
  2. +5 −0 isubata/proxy/src/isuroxy/server.go
@@ -22,9 +22,12 @@ func main() {
ts = 5
}
logging := os.Getenv("ISUROXY_LOGGING") == "1"
s := &Server{
Backend: backend,
Timeout: time.Duration(ts) * time.Second,
Logging: logging,
}
s.Start()
@@ -20,6 +20,7 @@ type Server struct {
Backend string
Timeout time.Duration
Logging bool
}
func (s *Server) Wait() {
@@ -76,6 +77,10 @@ func (s *Server) initRedis() {
break
}
if s.Logging {
log.Println("Receive Message")
}
for rec := range s.receivers {
rec <- struct{}{}
}

0 comments on commit d857220

Please sign in to comment.