Skip to content

Commit

Permalink
Remove dependency on prometheus/common/log; use logrus (#13)
Browse files Browse the repository at this point in the history
* Remove dependency on prometheus/common/log on only use logrus for all logging

* use logrus 1.9.2

* update go.sum
  • Loading branch information
jdrews authored May 26, 2023
1 parent 24f7e61 commit 15cc34b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 370 deletions.
3 changes: 0 additions & 3 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ The following components are included in this product:
This product includes software developed as part of the
Go project, https://golang.org/

This product includes software developed as part of the
Prometheus Golang client, https://github.com/prometheus/client_golang

This product includes software developed as part of the
"YAML support for the Go language" by Canonical Ltd.
https://github.com/go-yaml/yaml
4 changes: 2 additions & 2 deletions fswatcher/fswatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package fswatcher
import (
"fmt"
"github.com/jdrews/go-tailer/glob"
"github.com/prometheus/common/log"
"github.com/sirupsen/logrus"
"io"
"os"
Expand Down Expand Up @@ -203,9 +202,10 @@ func (t *fileTailer) shutdown() {

close(t.lines)
close(t.errors)
logger := logrus.New()

warnf := func(format string, args ...interface{}) {
log.Warnf("error while shutting down the file system watcher: %v", fmt.Sprintf(format, args))
logger.Warnf("error while shutting down the file system watcher: %v", fmt.Sprintf(format, args))
}

for _, dir := range t.watchedDirs {
Expand Down
4 changes: 0 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ module github.com/jdrews/go-tailer
require (
github.com/Shopify/sarama v1.27.0
github.com/bitly/go-simplejson v0.5.0
github.com/prometheus/common v0.13.0
github.com/sirupsen/logrus v1.9.2
golang.org/x/exp v0.0.0-20200917184745-18d7dbdd5567
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eapache/go-resiliency v1.2.0 // indirect
Expand All @@ -28,7 +25,6 @@ require (
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect
gopkg.in/jcmturner/gokrb5.v7 v7.5.0 // indirect
Expand Down
Loading

0 comments on commit 15cc34b

Please sign in to comment.