opensciencegrid / xrootd-monitoring-shoveler

XRootD monitoring flow packet shoveler
Apache License 2.0
2 stars 7 forks source link

Accept a logger as the universal logger in the package #49

Closed haoming29 closed 7 months ago

haoming29 commented 7 months ago

Instead of directly importing logrus and use it as the logger, this PR allows package user to drop a logger via shoveler.SetLogger which accepts a logrus.FieldLogger and sets a global variable log and shoveler uses that as the internal logger.

It won't break existing CLI as a default logger was added in-place

However, when doing E2E regression testing, I figured that the go version ingo mod seems to be outdated and go mod tidy gives error suggesting a higher version of go required. Therefore, this PR also updates Go version in go.mod and Dockerfile to v1.20

When running goreleaser for testing, it produces binary files at dist folder, so this PR added .gitignore to exclude dist folder.