replace dep with go modules (#16017)

- guide shamelessly stolen from prometheus/prometheus
- updates local interface of oauth exchange
- updates local impl of hclogger
- bump jaeger client version

closes #16088
This commit is contained in:
Carl Bergquist
2019-04-16 12:00:55 +02:00
committed by GitHub
parent d6b48ee099
commit 68f5ddf18c
944 changed files with 181567 additions and 137219 deletions
+10 -10
View File
@@ -9,12 +9,12 @@ import (
// and back into our Logger. This is basically the only way to
// build upon *log.Logger.
type stdlogAdapter struct {
hl Logger
log Logger
inferLevels bool
}
// Take the data, infer the levels if configured, and send it through
// a regular Logger
// a regular Logger.
func (s *stdlogAdapter) Write(data []byte) (int, error) {
str := string(bytes.TrimRight(data, " \t\n"))
@@ -22,26 +22,26 @@ func (s *stdlogAdapter) Write(data []byte) (int, error) {
level, str := s.pickLevel(str)
switch level {
case Trace:
s.hl.Trace(str)
s.log.Trace(str)
case Debug:
s.hl.Debug(str)
s.log.Debug(str)
case Info:
s.hl.Info(str)
s.log.Info(str)
case Warn:
s.hl.Warn(str)
s.log.Warn(str)
case Error:
s.hl.Error(str)
s.log.Error(str)
default:
s.hl.Info(str)
s.log.Info(str)
}
} else {
s.hl.Info(str)
s.log.Info(str)
}
return len(data), nil
}
// Detect, based on conventions, what log level this is
// Detect, based on conventions, what log level this is.
func (s *stdlogAdapter) pickLevel(str string) (Level, string) {
switch {
case strings.HasPrefix(str, "[DEBUG]"):