From 96ae35e2ac8c360781407d7294081aabdcbb3652 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 24 Feb 2017 09:58:04 +0100 Subject: p2p, p2p/discover, p2p/nat: rework logging using context keys --- p2p/discover/ntp.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'p2p/discover/ntp.go') diff --git a/p2p/discover/ntp.go b/p2p/discover/ntp.go index df67e1c5b..1bb52399f 100644 --- a/p2p/discover/ntp.go +++ b/p2p/discover/ntp.go @@ -23,7 +23,6 @@ import ( "fmt" "net" "sort" - "strings" "time" "github.com/ethereum/go-ethereum/log" @@ -50,16 +49,10 @@ func checkClockDrift() { return } if drift < -driftThreshold || drift > driftThreshold { - warning := fmt.Sprintf("System clock seems off by %v, which can prevent network connectivity", drift) - howtofix := fmt.Sprintf("Please enable network time synchronisation in system settings") - separator := strings.Repeat("-", len(warning)) - - log.Warn(fmt.Sprint(separator)) - log.Warn(fmt.Sprint(warning)) - log.Warn(fmt.Sprint(howtofix)) - log.Warn(fmt.Sprint(separator)) + log.Warn(fmt.Sprintf("System clock seems off by %v, which can prevent network connectivity", drift)) + log.Warn("Please enable network time synchronisation in system settings.") } else { - log.Debug(fmt.Sprintf("Sanity NTP check reported %v drift, all ok", drift)) + log.Debug("NTP sanity check done", "drift", drift) } } -- cgit v1.2.3