Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce logs for scaler-dlx #52

Merged
merged 6 commits into from
Jun 19, 2022
Merged

Conversation

yaelgen
Copy link
Collaborator

@yaelgen yaelgen commented Jun 19, 2022

No description provided.

Copy link
Collaborator

@liranbg liranbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏼
minor comments

@@ -101,14 +109,39 @@ func (h *Handler) handleRequest(res http.ResponseWriter, req *http.Request) {
res.WriteHeader(http.StatusInternalServerError)
return
}
h.logger.DebugWith("success creating targetURL")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove log line

@@ -101,14 +109,39 @@ func (h *Handler) handleRequest(res http.ResponseWriter, req *http.Request) {
res.WriteHeader(http.StatusInternalServerError)
return
}
h.logger.DebugWith("success creating targetURL")

//if in cache, do not log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//if in cache, do not log
// if in cache, do not log

instead of comment what, comment why

Comment on lines +132 to +137
if strings.Contains(err.Error(), "context canceled") && timeSinceLastCtxErr {
h.lastProxyErrorTime = time.Now()
}
if !strings.Contains(err.Error(), "context canceled") || timeSinceLastCtxErr {
h.logger.DebugWith("http: proxy error", "error", err)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment what are you trying to achieve here / why

@liranbg liranbg merged commit 63ab43c into v3io:development Jun 19, 2022
@yaelgen yaelgen changed the title Fix dlx logs Reduce logs for scaler-dlx Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants