2022-11-30 10:51:24 +01:00
|
|
|
package logg
|
|
|
|
|
|
|
|
import "github.com/zerodha/logf"
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
type AsynqLogger struct {
|
|
|
|
Lo *logf.Logger
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func AsynqCompatibleLogger(lo logf.Logger) AsynqLogger {
|
|
|
|
return AsynqLogger{
|
|
|
|
Lo: &lo,
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func (l AsynqLogger) Debug(args ...interface{}) {
|
|
|
|
l.Lo.Debug("asynq", "debug", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func (l AsynqLogger) Info(args ...interface{}) {
|
|
|
|
l.Lo.Info("asynq", "info", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func (l AsynqLogger) Warn(args ...interface{}) {
|
|
|
|
l.Lo.Warn("asynq", "warn", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func (l AsynqLogger) Error(args ...interface{}) {
|
|
|
|
l.Lo.Error("asynq", "error", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func (l AsynqLogger) Fatal(args ...interface{}) {
|
|
|
|
l.Lo.Fatal("asynq", "fatal", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|