Fix logging: add response_bytes to middleware, cache_key to handler
- Middleware now tracks and logs bytes written via response_bytes - Handler logs cache_key for cache hit debugging - Changed "served encrypted image" to "image served" (only URL is encrypted)
This commit is contained in:
@@ -91,7 +91,8 @@ func (s *Handlers) HandleImageEnc() http.HandlerFunc {
|
||||
|
||||
// Log completion
|
||||
duration := time.Since(start)
|
||||
s.log.Info("served encrypted image",
|
||||
s.log.Info("image served",
|
||||
"cache_key", imgcache.CacheKey(req),
|
||||
"host", req.SourceHost,
|
||||
"path", req.SourcePath,
|
||||
"format", req.Format,
|
||||
|
||||
Reference in New Issue
Block a user