Add upstream connection info and download metrics to logging

- Capture TLS version, cipher suite, HTTP version, and remote addr
- Add download bitrate using go-humanize SI formatting
- Use consistent WxH format for dimensions (not struct notation)
- Rename input/output to src/dst for consistency
- Add separate "upstream fetched" log with connection details
This commit is contained in:
2026-01-08 12:47:31 -08:00
parent 7d0ac0a139
commit 77c6744383
4 changed files with 66 additions and 13 deletions

View File

@@ -2,6 +2,7 @@ package handlers
import (
"errors"
"fmt"
"io"
"net/http"
"strconv"
@@ -57,7 +58,7 @@ func (s *Handlers) HandleImageEnc() http.HandlerFunc {
s.log.Debug("encrypted image request",
"host", req.SourceHost,
"path", req.SourcePath,
"size", req.Size,
"dimensions", fmt.Sprintf("%dx%d", req.Size.Width, req.Size.Height),
"format", req.Format,
)