Skip to content

Commit 1ba9a97

Browse files
committed
Remove debug and improve logging
Signed-off-by: Markus Blaschke <[email protected]>
1 parent c92a215 commit 1ba9a97

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

probe_metrics_list.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ func probeMetricsListHandler(w http.ResponseWriter, r *http.Request) {
115115
wg.Wait()
116116

117117
// enable caching if enabled
118-
fmt.Println(settings.CacheDuration(startTime))
119118
if cacheDuration := settings.CacheDuration(startTime); cacheDuration != nil {
120-
fmt.Println(settings.CacheDuration(startTime).String())
121119
metricsList.StoreToCache(cacheKey, *cacheDuration)
122120
w.Header().Add("X-metrics-cached-until", time.Now().Add(*cacheDuration).Format(time.RFC3339))
123121
}

request.metric.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package main
22

33
import (
4-
"fmt"
54
iso8601 "github.com/ChannelMeter/iso8601duration"
65
"net/http"
76
"strconv"
@@ -114,7 +113,7 @@ func NewRequestMetricSettings(r *http.Request) (RequestMetricSettings, error) {
114113
if val, err := time.ParseDuration(cacheDurationString); err == nil {
115114
ret.Cache = &val
116115
} else {
117-
fmt.Println(err.Error())
116+
Logger.Error(err.Error())
118117
return ret, err
119118
}
120119
}

0 commit comments

Comments
 (0)