Browse Source

Return logger timeout

Vova Tkach 5 years ago
parent
commit
8ba475f8d6
2 changed files with 2 additions and 2 deletions
  1. 1 1
      logger/handler.go
  2. 1 1
      logger/logger.go

+ 1 - 1
logger/handler.go

@@ -46,7 +46,7 @@ func (this handler) log(w *writer, r *http.Request) {
 		return
 	case this.c <- logMsg{r.Host, msg, w.status >= 400}:
 		return
-	case <-time.After(2 * time.Second):
+	case <-time.After(1 * time.Second):
 		fmt.Printf("Logger, can't write to file (overflow): %s\n", msg)
 		return
 	}

+ 1 - 1
logger/logger.go

@@ -151,7 +151,7 @@ func (this *Logger) Log(msg string, r *http.Request, isError bool, vars ...inter
 		return
 	case this.cdata <- logMsg{host, msg, isError}:
 		return
-	case <-time.After(2 * time.Second):
+	case <-time.After(1 * time.Second):
 		fmt.Printf("Logger, can't send msg (overflow): %s, %s, %v\n", host, msg, isError)
 		return
 	}