cic-custodial/pkg/logg/asynq.go
2023-02-17 11:43:20 +03:00

35 lines
695 B
Go

package logg
import "github.com/zerodha/logf"
type AsynqLogg struct {
logg *logf.Logger
}
// NewAsynqLogg creates a logf based logging adapter for asynq.
func NewAsynqLogg(lo logf.Logger) AsynqLogg {
return AsynqLogg{
logg: &lo,
}
}
func (l AsynqLogg) Debug(args ...interface{}) {
l.logg.Debug("asynq", "debug", args[0])
}
func (l AsynqLogg) Info(args ...interface{}) {
l.logg.Info("asynq", "info", args[0])
}
func (l AsynqLogg) Warn(args ...interface{}) {
l.logg.Warn("asynq", "warn", args[0])
}
func (l AsynqLogg) Error(args ...interface{}) {
l.logg.Error("asynq", "error", args[0])
}
func (l AsynqLogg) Fatal(args ...interface{}) {
l.logg.Fatal("asynq", "fatal", args[0])
}