Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHclogAdapter ¶
func NewHclogAdapter(logger hclog.Logger) resty.Logger
NewHclogAdapter creates a new adapter that forwards messages to an hclog.Logger.
func SetLoggerForResty ¶
func SetLoggerForResty(client *resty.Client, logger hclog.Logger)
SetLoggerForResty sets the adapted hclog.Logger as the logger for Resty.
Types ¶
type Client ¶
type Client struct {
RestyClient *resty.Client
}
Client represents a Resty a wrapper for the Resty client.
type HclogAdapter ¶
type HclogAdapter struct {
// contains filtered or unexported fields
}
HclogAdapter adapts an hclog.Logger to be compatible with the resty log.Logger interface.
func (*HclogAdapter) Debugf ¶
func (a *HclogAdapter) Debugf(format string, v ...interface{})
Debugf logs a message at the debug level.
func (*HclogAdapter) Errorf ¶
func (a *HclogAdapter) Errorf(format string, v ...interface{})
Errorf logs a message at the error level.
func (*HclogAdapter) Infof ¶
func (a *HclogAdapter) Infof(format string, v ...interface{})
Infof logs a message at the info level.
func (*HclogAdapter) Warnf ¶
func (a *HclogAdapter) Warnf(format string, v ...interface{})
Warnf logs a message at the warning level.
Click to show internal directories.
Click to hide internal directories.