Commit Graph

4 Commits

Author SHA1 Message Date
Nathan Johnson
8c6aae6360 Removes hard dependency on logrus for logging
Provides backwards compatibility with existing logrus via SetLogger() method

Introduces a Logger interface that others can implement for other
structured loggers such as zerolog.

Add SetLoggerFromLogger method that allows caller to pass in an implementation
of the new Logger interface.

Bumps the golang.org/x/sys dependency since tests fail to run on go 1.18 with the old version.

adding a test case for LogrusLogger

adding benchmark, add WithFields method because it's a lot faster apparently
2022-06-01 19:16:44 -05:00
Derrick J. Wippler
ff66388131 Consistenthash improvements
* Now uses the much faster fnv1
* Now md5 hashs the keys to help distribute hosts more evenly in some
  cases.
2021-01-13 14:24:22 -06:00
Tommy PAGEARD
14bc5ab47f feat(metrics/logger): add new metric And logger possiblity for peers error
Introducing a new metric GetFromPeersSlowestDuration which will be recording the slowest
call made to getFromPeers.

Introducing SetLogger() to set a logger and allow getFromPeers error to be logged of.
2020-07-06 18:55:17 +02:00
Derrick J. Wippler
e72846e064 Added support for go modules 2019-04-09 17:36:47 -05:00