0
0
forked from toolshed/abra

refactor: use central logger

This commit is contained in:
2024-07-07 23:45:37 +02:00
parent cf8ff410cc
commit ef108d63e1
86 changed files with 903 additions and 889 deletions

View File

@ -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