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{}) {
|
2023-03-06 09:18:41 +01:00
|
|
|
l.Lo.Debug("asynq: server", "msg", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func (l AsynqLogger) Info(args ...interface{}) {
|
2023-03-06 09:18:41 +01:00
|
|
|
l.Lo.Info("asynq: server", "msg", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func (l AsynqLogger) Warn(args ...interface{}) {
|
2023-03-06 09:18:41 +01:00
|
|
|
l.Lo.Warn("asynq: server", "msg", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func (l AsynqLogger) Error(args ...interface{}) {
|
2023-03-06 09:18:41 +01:00
|
|
|
l.Lo.Error("asynq: server", "msg", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|
|
|
|
|
2023-02-20 10:56:30 +01:00
|
|
|
func (l AsynqLogger) Fatal(args ...interface{}) {
|
2023-03-06 09:18:41 +01:00
|
|
|
l.Lo.Fatal("asynq: server", "msg", args[0])
|
2022-11-30 10:51:24 +01:00
|
|
|
}
|