diff options
author | Felix Lange <fjl@twurst.com> | 2017-02-24 16:58:04 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2017-02-28 17:20:29 +0800 |
commit | 96ae35e2ac8c360781407d7294081aabdcbb3652 (patch) | |
tree | 378cc7aae99127a4e85a721e5cd319ced87e103a /p2p/discover/ntp.go | |
parent | 35e8308bf76df11c3c1e8d11fac782814583ea5c (diff) | |
download | go-tangerine-96ae35e2ac8c360781407d7294081aabdcbb3652.tar go-tangerine-96ae35e2ac8c360781407d7294081aabdcbb3652.tar.gz go-tangerine-96ae35e2ac8c360781407d7294081aabdcbb3652.tar.bz2 go-tangerine-96ae35e2ac8c360781407d7294081aabdcbb3652.tar.lz go-tangerine-96ae35e2ac8c360781407d7294081aabdcbb3652.tar.xz go-tangerine-96ae35e2ac8c360781407d7294081aabdcbb3652.tar.zst go-tangerine-96ae35e2ac8c360781407d7294081aabdcbb3652.zip |
p2p, p2p/discover, p2p/nat: rework logging using context keys
Diffstat (limited to 'p2p/discover/ntp.go')
-rw-r--r-- | p2p/discover/ntp.go | 13 |
1 files changed, 3 insertions, 10 deletions
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) } } |