about summary refs log tree commit diff stats
path: root/internal/server/server.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-19 15:53:09 +0200
committerAlan Pearce2024-05-19 15:53:32 +0200
commitaf7b5d9478df3da1a46e14e39fafb9fe475b0c0f (patch)
treefc889d45a1b002131f590397cb2cab6600a0836d /internal/server/server.go
parent09ee2de72936ea0b0edc5d3360ce1c72803a817b (diff)
downloadwebsite-af7b5d9478df3da1a46e14e39fafb9fe475b0c0f.tar.lz
website-af7b5d9478df3da1a46e14e39fafb9fe475b0c0f.tar.zst
website-af7b5d9478df3da1a46e14e39fafb9fe475b0c0f.zip
use zap for logging http requests as well
Diffstat (limited to 'internal/server/server.go')
-rw-r--r--internal/server/server.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index 62e32d5..b4cfc7f 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -3,7 +3,6 @@ package server
 import (
 	"context"
 	"fmt"
-	"io"
 	"mime"
 	"net"
 	"net/http"
@@ -19,7 +18,6 @@ import (
 	"github.com/getsentry/sentry-go"
 	sentryhttp "github.com/getsentry/sentry-go/http"
 	"github.com/pkg/errors"
-	"github.com/shengyanli1982/law"
 )
 
 var config *cfg.Config
@@ -168,17 +166,10 @@ func New(runtimeConfig *Config) (*Server, error) {
 		http.Redirect(w, r, newURL, 301)
 	})
 
-	var logWriter io.Writer
-	if runtimeConfig.Production {
-		logWriter = law.NewWriteAsyncer(os.Stdout, nil)
-	} else {
-		logWriter = os.Stdout
-	}
 	top.Handle("/",
 		sentryHandler.Handle(
 			wrapHandlerWithLogging(mux, wrappedHandlerOptions{
 				defaultHostname: runtimeConfig.BaseURL.Hostname(),
-				logger:          logWriter,
 			}),
 		),
 	)