Skip to content

Commit

Permalink
Remove debug and improve logging
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed May 28, 2020
1 parent c92a215 commit 1ba9a97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions probe_metrics_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ func probeMetricsListHandler(w http.ResponseWriter, r *http.Request) {
wg.Wait()

// enable caching if enabled
fmt.Println(settings.CacheDuration(startTime))
if cacheDuration := settings.CacheDuration(startTime); cacheDuration != nil {
fmt.Println(settings.CacheDuration(startTime).String())
metricsList.StoreToCache(cacheKey, *cacheDuration)
w.Header().Add("X-metrics-cached-until", time.Now().Add(*cacheDuration).Format(time.RFC3339))
}
Expand Down
3 changes: 1 addition & 2 deletions request.metric.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"fmt"
iso8601 "github.com/ChannelMeter/iso8601duration"
"net/http"
"strconv"
Expand Down Expand Up @@ -114,7 +113,7 @@ func NewRequestMetricSettings(r *http.Request) (RequestMetricSettings, error) {
if val, err := time.ParseDuration(cacheDurationString); err == nil {
ret.Cache = &val
} else {
fmt.Println(err.Error())
Logger.Error(err.Error())
return ret, err
}
}
Expand Down

0 comments on commit 1ba9a97

Please sign in to comment.