From e446a84346ceac9d0420cf1f5ccda34982f8a1ea Mon Sep 17 00:00:00 2001 From: Nikita Vaniasin Date: Wed, 27 Sep 2023 10:43:38 +0200 Subject: [PATCH] Adjust log level to info --- pkg/exporter/monitor.go | 4 ++-- pkg/util/arangod/endpoint.go | 40 ------------------------------------ 2 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 pkg/util/arangod/endpoint.go diff --git a/pkg/exporter/monitor.go b/pkg/exporter/monitor.go index e034f668d..773628443 100644 --- a/pkg/exporter/monitor.go +++ b/pkg/exporter/monitor.go @@ -76,14 +76,14 @@ func (m monitor) UpdateMonitorStatus(ctx context.Context) { health, err := m.GetClusterHealth() if err != nil { - logger.Err(err).Error("GetClusterHealth error") + logger.Err(err).Info("GetClusterHealth error") sleep = failRefreshInterval } else { var output strings.Builder for key, value := range health.Health { entry, err := m.GetMemberStatus(key, value) if err != nil { - logger.Err(err).Error("GetMemberStatus error") + logger.Err(err).Info("GetMemberStatus error") sleep = failRefreshInterval } output.WriteString(entry) diff --git a/pkg/util/arangod/endpoint.go b/pkg/util/arangod/endpoint.go deleted file mode 100644 index 41af9a752..000000000 --- a/pkg/util/arangod/endpoint.go +++ /dev/null @@ -1,40 +0,0 @@ -// -// DISCLAIMER -// -// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Copyright holder is ArangoDB GmbH, Cologne, Germany -// - -package arangod - -import "net/url" - -// IsSameEndpoint returns true when the 2 given endpoints -// refer to the same server. -func IsSameEndpoint_(a, b string) bool { - if a == b { - return true - } - ua, err := url.Parse(a) - if err != nil { - return false - } - ub, err := url.Parse(b) - if err != nil { - return false - } - return ua.Hostname() == ub.Hostname() -}