grok_exporter icon indicating copy to clipboard operation
grok_exporter copied to clipboard

Consistently use logrus instead of prometheus/common/log

Open hoffie opened this issue 2 years ago • 0 comments

https://github.com/fstab/grok_exporter/blob/9a9c6da699a55365999cc47be72064e64eadb9b7/tailer/fswatcher/fswatcher.go#L208 references "log", which the go tooling resolves to github.com/prometheus/common/log. The latter is deprecated and has been renamed to promlog in recent versions. Therefore, the build is broken when grok_exporter parts are imported by other packages which rely on newer prometheus/common versions.

I believe that prometheus/common/log was never supposed to be used as all other places use logrus.

I have therefore updated the file to use the logrus instance from the caller.

hoffie avatar Jan 06 '22 07:01 hoffie