Skip to content

Commit

Permalink
remove verbose logging by default
Browse files Browse the repository at this point in the history
  • Loading branch information
renbou committed Nov 18, 2023
1 parent d789a58 commit 12219b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cacheproxy/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,14 @@ func main() {
authKey: os.Getenv("AUTH_KEY"),
}

handler.proxy.Verbose = true

handler.proxy.Verbose = os.Getenv("VERBOSE_LOGS") == "t"
handler.proxy.OnRequest().HandleConnect(goproxy.FuncHttpsHandler(handler.HandleConnect))
handler.proxy.OnRequest().DoFunc(handler.OnRequest)
handler.proxy.OnResponse().DoFunc(handler.OnResponse)

log.Printf("Proxy started on :8888")
srv := &http.Server{
Addr: ":8888",
// Handler: http.TimeoutHandler(handler, time.Minute, "timed out"),
Addr: ":8888",
Handler: handler,
ReadTimeout: time.Second * 10,
IdleTimeout: time.Minute * 2,
Expand Down
1 change: 1 addition & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ services:
environment:
REDIS_URL: "redis://redis:6379/2"
AUTH_KEY: "${CACHEPROXY_AUTH_KEY:-changeme}"
VERBOSE_LOGS: "f"
ports:
- "8888:8888"
depends_on:
Expand Down

0 comments on commit 12219b9

Please sign in to comment.