mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
code refactor
This commit is contained in:
@@ -3,6 +3,7 @@ package cron
|
||||
import (
|
||||
"github.com/go-co-op/gocron/v2"
|
||||
|
||||
"github.com/mayswind/ezbookkeeping/pkg/core"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/log"
|
||||
)
|
||||
|
||||
@@ -12,22 +13,22 @@ type GocronLoggerAdapter struct {
|
||||
|
||||
// Debug logs debug log
|
||||
func (logger GocronLoggerAdapter) Debug(msg string, args ...any) {
|
||||
log.Debugf(msg, args...)
|
||||
log.Debugf(core.NewNullContext(), msg, args...)
|
||||
}
|
||||
|
||||
// Info logs info log
|
||||
func (logger GocronLoggerAdapter) Info(msg string, args ...any) {
|
||||
log.Infof(msg, args...)
|
||||
log.Infof(core.NewNullContext(), msg, args...)
|
||||
}
|
||||
|
||||
// Warn logs warn log
|
||||
func (logger GocronLoggerAdapter) Warn(msg string, args ...any) {
|
||||
log.Warnf(msg, args...)
|
||||
log.Warnf(core.NewNullContext(), msg, args...)
|
||||
}
|
||||
|
||||
// Error logs error log
|
||||
func (logger GocronLoggerAdapter) Error(msg string, args ...any) {
|
||||
log.Errorf(msg, args...)
|
||||
log.Errorf(core.NewNullContext(), msg, args...)
|
||||
}
|
||||
|
||||
// NewGocronLoggerAdapter returns a new GocronLoggerAdapter instance
|
||||
|
||||
Reference in New Issue
Block a user