Browse Source

Remove commented code

Vova Tkach 6 years ago
parent
commit
3b45d1b86a
2 changed files with 0 additions and 24 deletions
  1. 0 12
      logger/handler.go
  2. 0 12
      logger/logger.go

+ 0 - 12
logger/handler.go

@@ -29,18 +29,6 @@ func (this handler) log(w *writer, r *http.Request) {
 		fmt.Sprintf("%.3f ms", time.Now().Sub(w.s).Seconds()),
 	}, " "))
 
-	// Do not wait
-	// go func() {
-	// 	select {
-	// 	case this.c <- logMsg{r.Host, msg, w.status >= 400}:
-	// 		return
-	// 	case <-time.After(1 * time.Second):
-	// 		fmt.Println("Logger error, log channel is overflowed (2)")
-	// 		return
-	// 	}
-	// }()
-
-	// Wait
 	select {
 	case this.c <- logMsg{r.Host, msg, w.status >= 400}:
 		return

+ 0 - 12
logger/logger.go

@@ -135,18 +135,6 @@ func (this *Logger) Log(msg string, r *http.Request, isError bool, vars ...inter
 		msg = fmt.Sprintf(msg, vars...)
 	}
 
-	// Do not wait
-	// go func() {
-	// 	select {
-	// 	case this.cdata <- logMsg{host, msg, isError}:
-	// 		return
-	// 	case <-time.After(1 * time.Second):
-	// 		fmt.Println("Logger error, log channel is overflowed (1)")
-	// 		return
-	// 	}
-	// }()
-
-	// Wait
 	select {
 	case this.cdata <- logMsg{host, msg, isError}:
 		return