Skip to content
Snippets Groups Projects
Commit 33259f5f authored by Travis Ralston's avatar Travis Ralston
Browse files

Collapse HTML responses in the logs

parent 86ea2d7a
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Changed
* The Docker image now uses the migrations packed into the binary instead of the in-image ones.
* Reduced log spam when someone views an export.
## [1.1.1] - March 26th, 2020
......
......@@ -126,7 +126,12 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
break
}
contextLog.Info(fmt.Sprintf("Replying with result: %T %+v", res, res))
htmlRes, isHtml := res.(*api.HtmlResponse)
if isHtml {
contextLog.Info(fmt.Sprintf("Replying with result: %T %+v", res, fmt.Sprintf("<%d chars of html>", len(htmlRes.HTML))))
} else {
contextLog.Info(fmt.Sprintf("Replying with result: %T %+v", res, res))
}
statusCode := http.StatusOK
switch result := res.(type) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment