forked from toolshed/abra
refactor: use central logger
This commit is contained in:
@ -3,18 +3,18 @@ package web
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"github.com/hashicorp/go-retryablehttp"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// customLeveledLogger is custom logger with logrus baked in
|
||||
// customLeveledLogger is custom logger with custom logger baked in
|
||||
type customLeveledLogger struct {
|
||||
retryablehttp.Logger
|
||||
}
|
||||
|
||||
// Printf wires up logrus into the custom retryablehttp logger
|
||||
// Printf wires up our existing custom logger into the custom retryablehttp logger
|
||||
func (l customLeveledLogger) Printf(msg string, args ...interface{}) {
|
||||
logrus.Debugf(fmt.Sprintf(msg, args...))
|
||||
log.Debugf(fmt.Sprintf(msg, args...))
|
||||
}
|
||||
|
||||
// NewHTTPRetryClient instantiates a new http client with retries baked in
|
||||
|
Reference in New Issue
Block a user