This is an automated email from the ASF dual-hosted git repository.
zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 82e9944 Dont pollute logs with non-errors (#5325)
82e9944 is described below
commit 82e9944b0dc6631103ddd302948ce46e5236a74c
Author: Steve Hamrick <[email protected]>
AuthorDate: Mon Nov 30 11:55:39 2020 -0700
Dont pollute logs with non-errors (#5325)
---
lib/go-tc/traffic_monitor.go | 2 +-
traffic_monitor/threadsafe/resultstathistory.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/go-tc/traffic_monitor.go b/lib/go-tc/traffic_monitor.go
index 5e1bd8a..6f7f1b2 100644
--- a/lib/go-tc/traffic_monitor.go
+++ b/lib/go-tc/traffic_monitor.go
@@ -185,7 +185,7 @@ func (s *Stats) ToLegacy(monitorConfig
TrafficMonitorConfigMap) ([]string, Legac
continue
}
monitorInterfaceStats, ok :=
cache.Interfaces[*legacyInterface.InterfaceName]
- if !ok {
+ if !ok && len(cache.Interfaces) > 0 {
skippedCaches = append(skippedCaches, "Cache
"+cacheName+" does not contain interface "+
*legacyInterface.InterfaceName)
continue
diff --git a/traffic_monitor/threadsafe/resultstathistory.go
b/traffic_monitor/threadsafe/resultstathistory.go
index 0158bfc..5af8cda 100644
--- a/traffic_monitor/threadsafe/resultstathistory.go
+++ b/traffic_monitor/threadsafe/resultstathistory.go
@@ -497,7 +497,7 @@ func LegacyStatsMarshall(
stats := generateStats(statResultHistory, statInfo, combinedStates,
monitorConfig, statMaxKbpses, filter, params)
skippedCaches, legacyStats := stats.ToLegacy(monitorConfig)
if len(skippedCaches) > 0 {
- log.Errorln(strings.Join(skippedCaches, "\n"))
+ log.Warnln(strings.Join(skippedCaches, "\n"))
}
json := jsoniter.ConfigFastest // TODO make configurable