Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently use logrus instead of prometheus/common/log #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hoffie
Copy link

@hoffie hoffie commented Jan 6, 2022

log.Warnf("error while shutting down the file system watcher: %v", fmt.Sprintf(format, args))
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 added a commit to hoffie/multilog_exporter that referenced this pull request Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant