From 954b2840ee9c7475a6390564e0f06ca94d1f9d09 Mon Sep 17 00:00:00 2001 From: Adit Sachde <23707194+aditsachde@users.noreply.github.com> Date: Fri, 27 Sep 2024 22:43:33 -0400 Subject: [PATCH] reduce extranous logging --- cmd/fastly-monitor/main.go | 4 ---- internal/ctmonitor/fastly.go | 3 --- 2 files changed, 7 deletions(-) diff --git a/cmd/fastly-monitor/main.go b/cmd/fastly-monitor/main.go index 1a6a72b..2a499f8 100644 --- a/cmd/fastly-monitor/main.go +++ b/cmd/fastly-monitor/main.go @@ -1,14 +1,10 @@ package main import ( - "log" - "os" - "github.com/fastly/compute-sdk-go/fsthttp" "itko.dev/internal/ctmonitor" ) func main() { - log.Println("FASTLY_SERVICE_VERSION:", os.Getenv("FASTLY_SERVICE_VERSION")) fsthttp.ServeFunc(ctmonitor.FastlyServe) } diff --git a/internal/ctmonitor/fastly.go b/internal/ctmonitor/fastly.go index c490cb0..9e0782e 100644 --- a/internal/ctmonitor/fastly.go +++ b/internal/ctmonitor/fastly.go @@ -68,8 +68,6 @@ func FastlyServe(ctx context.Context, w fsthttp.ResponseWriter, r *fsthttp.Reque func FastlyWrapper(wrapped func(ctx context.Context, reqBody io.ReadCloser, query url.Values) (resp []byte, code int, err error)) func(c context.Context, w fsthttp.ResponseWriter, r *fsthttp.Request) { return func(c context.Context, w fsthttp.ResponseWriter, r *fsthttp.Request) { - log.Println("Path:", r.URL.Path, "Method:", r.Method, "Query:", r.URL.Query()) - query := r.URL.Query() resp, code, err := wrapped(c, r.Body, query) @@ -112,7 +110,6 @@ func (f *FastlyStorage) Get(ctx context.Context, key string) (data []byte, notfo cacheFunc := func() (simple.CacheEntry, error) { f.requests++ - fmt.Println("Request count:", f.requests) req, err := fsthttp.NewRequest("GET", url, nil) req.CacheOptions = fsthttp.CacheOptions{