fix(proxy): use Debug log level for per-request logs
- commit
- 2e916c6360405db32a1ae9dc073635d1afb0e842
- author
- bnema · · 2026-01-16 22:02 UTC
- parent
- 7b55ac6
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +3 -3
M internal/usecase/proxy/service.go +3 -3
| @@ -89,7 +89,7 @@ func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||
| 89 | 89 | } | |
| 90 | 90 | ||
| 91 | 91 | // Get target for this domain | |
| 92 | - | log.Info().Str("resolving_target_for", r.Host).Msg("looking up proxy target") | |
| 92 | + | log.Debug().Str("resolving_target_for", r.Host).Msg("looking up proxy target") | |
| 93 | 93 | target, err := s.GetTarget(ctx, r.Host) | |
| 94 | 94 | if err != nil { | |
| 95 | 95 | log.Warn().Err(err).Msg("no route found for domain") | |
| @@ -97,7 +97,7 @@ func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||
| 97 | 97 | return | |
| 98 | 98 | } | |
| 99 | 99 | ||
| 100 | - | log.Info(). | |
| 100 | + | log.Debug(). | |
| 101 | 101 | Str("host", target.Host). | |
| 102 | 102 | Int("port", target.Port). | |
| 103 | 103 | Str("container_id", target.ContainerID). | |
| @@ -303,7 +303,7 @@ func (s *Service) proxyToTarget(w http.ResponseWriter, r *http.Request, target * | |||
| 303 | 303 | return | |
| 304 | 304 | } | |
| 305 | 305 | ||
| 306 | - | log.Info().Str("target_url", targetURL.String()).Msg("proxying to target") | |
| 306 | + | log.Debug().Str("target_url", targetURL.String()).Msg("proxying to target") | |
| 307 | 307 | ||
| 308 | 308 | proxy := newReverseProxy(targetURL, | |
| 309 | 309 | func(w http.ResponseWriter, _ *http.Request, err error) { | |
| @@ -89,7 +89,7 @@ func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||||
| 89 | } | 89 | } | ||
| 90 | 90 | ||||
| 91 | // Get target for this domain | 91 | // Get target for this domain | ||
| 92 | - | log.Info().Str("resolving_target_for", r.Host).Msg("looking up proxy target") | 92 | + | log.Debug().Str("resolving_target_for", r.Host).Msg("looking up proxy target") |
| 93 | target, err := s.GetTarget(ctx, r.Host) | 93 | target, err := s.GetTarget(ctx, r.Host) | ||
| 94 | if err != nil { | 94 | if err != nil { | ||
| 95 | log.Warn().Err(err).Msg("no route found for domain") | 95 | log.Warn().Err(err).Msg("no route found for domain") | ||
| @@ -97,7 +97,7 @@ func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||||
| 97 | return | 97 | return | ||
| 98 | } | 98 | } | ||
| 99 | 99 | ||||
| 100 | - | log.Info(). | 100 | + | log.Debug(). |
| 101 | Str("host", target.Host). | 101 | Str("host", target.Host). | ||
| 102 | Int("port", target.Port). | 102 | Int("port", target.Port). | ||
| 103 | Str("container_id", target.ContainerID). | 103 | Str("container_id", target.ContainerID). | ||
| @@ -303,7 +303,7 @@ func (s *Service) proxyToTarget(w http.ResponseWriter, r *http.Request, target * | |||||
| 303 | return | 303 | return | ||
| 304 | } | 304 | } | ||
| 305 | 305 | ||||
| 306 | - | log.Info().Str("target_url", targetURL.String()).Msg("proxying to target") | 306 | + | log.Debug().Str("target_url", targetURL.String()).Msg("proxying to target") |
| 307 | 307 | ||||
| 308 | proxy := newReverseProxy(targetURL, | 308 | proxy := newReverseProxy(targetURL, | ||
| 309 | func(w http.ResponseWriter, _ *http.Request, err error) { | 309 | func(w http.ResponseWriter, _ *http.Request, err error) { | ||