File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ version: 0.1.13
2121# incremented each time you make changes to the application. Versions are not expected to
2222# follow Semantic Versioning. They should reflect the version the application is using.
2323# It is recommended to use it with quotes.
24- appVersion : " 18663188218 "
24+ appVersion : " 18692524666 "
Original file line number Diff line number Diff line change 66 "github.com/prometheus/client_golang/prometheus/promauto"
77 "go.uber.org/zap"
88 "net/http"
9- "strings"
109 "time"
1110 "timekeeper/config"
1211)
@@ -50,10 +49,12 @@ func Log(next http.Handler) http.Handler {
5049 requestDuration .Observe (float64 (d .Milliseconds ()))
5150 }
5251
53- if strings . Contains ( request . URL . Path , "/export/" ) {
54- log .Debug ("handled www request" , zap .Duration ("duration" , d ))
55- } else {
52+ if d > 100 * time . Millisecond {
53+ log .Warn ("handled www request" , zap .Duration ("duration" , d ))
54+ } else if request . Method != http . MethodGet {
5655 log .Info ("handled www request" , zap .Duration ("duration" , d ))
56+ } else {
57+ log .Debug ("handled www request" , zap .Duration ("duration" , d ))
5758 }
5859 })
5960}
You can’t perform that action at this time.
0 commit comments