summaryrefslogtreecommitdiff
path: root/logging
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-28 14:52:35 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-28 15:01:41 -0700
commit66a1b1f39a1e1d5499b548b36d18c8daa872d7da (patch)
tree96471dbd5486ede1a908790ac23e0c55b226dfad /logging
parenta27b879accb191b6a6c6e76a6251ed751967f73a (diff)
gopher support.
Some of the contrib packages were originally built gemini-specific and had to be refactored into generic core functionality and thin protocol-specific wrappers for each of gemini and gopher.
Diffstat (limited to 'logging')
-rw-r--r--logging/middleware.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/logging/middleware.go b/logging/middleware.go
index 5527ce7..5442203 100644
--- a/logging/middleware.go
+++ b/logging/middleware.go
@@ -3,7 +3,6 @@ package logging
import (
"context"
"errors"
- "fmt"
"io"
"time"
@@ -38,7 +37,7 @@ func (lr *loggedResponseBody) log() {
end := time.Now()
_ = lr.logger.Log(
"msg", "request",
- "ts", end,
+ "ts", end.UTC(),
"dur", end.Sub(lr.start),
"url", lr.request.URL,
"status", lr.response.Status,
@@ -74,7 +73,6 @@ type loggedWriteToResponseBody struct {
}
func (lwtr loggedWriteToResponseBody) WriteTo(dst io.Writer) (int64, error) {
- fmt.Println("lwtrb.WriteTo()")
n, err := lwtr.body.(io.WriterTo).WriteTo(dst)
if err == nil {
lwtr.written += int(n)