Skip to content

Commit

Permalink
Merge pull request #20 from rlankfo/logging
Browse files Browse the repository at this point in the history
remove dependency on github.com/prometheus/common/log
  • Loading branch information
denisok authored Nov 8, 2021
2 parents bba6792 + 80f602c commit 8555cdb
Show file tree
Hide file tree
Showing 4 changed files with 434 additions and 42 deletions.
4 changes: 2 additions & 2 deletions basic_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ package exporter_shared
import (
"crypto/subtle"
"io/ioutil"
"log"
"net/http"
"os"
"strings"

"github.com/prometheus/common/log"
"gopkg.in/alecthomas/kingpin.v2"
"gopkg.in/yaml.v2"
)
Expand Down Expand Up @@ -88,7 +88,7 @@ func (h *basicAuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
func authHandler(handler http.Handler) http.Handler {
auth := readBasicAuth()
if auth.Username != "" && auth.Password != "" {
log.Infoln("HTTP Basic authentication is enabled.")
log.Println("HTTP Basic authentication is enabled.")
return &basicAuthHandler{basicAuth: *auth, nextHandler: handler}
}

Expand Down
15 changes: 4 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@ module github.com/percona/exporter_shared
go 1.12

require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/golang/protobuf v1.3.2 // indirect
github.com/prometheus/client_golang v0.9.2
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
github.com/prometheus/common v0.2.0
github.com/sirupsen/logrus v1.4.2 // indirect
github.com/stretchr/testify v1.3.0 // indirect
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 // indirect
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.31.1
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/yaml.v2 v2.2.4
gopkg.in/yaml.v2 v2.4.0
)
Loading

0 comments on commit 8555cdb

Please sign in to comment.