diff options
Diffstat (limited to 'common/timer.go')
| -rw-r--r-- | common/timer.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/timer.go b/common/timer.go index 553a8fd..aaea326 100644 --- a/common/timer.go +++ b/common/timer.go @@ -9,8 +9,7 @@ import ( func NewTimer(ctx context.Context, d time.Duration, fn func(context.Context, context.CancelFunc)) context.CancelFunc { ctx, cancel := context.WithCancel(ctx) - logger := bot.Logger(ctx).With("module", "timer") - ctx = bot.SetLogger(ctx, logger) + ctx = bot.SetLogger(ctx, bot.Logger(ctx).With("module", "timer")) go func(ctx context.Context, d time.Duration) { ticker := time.NewTicker(d) fn(ctx, cancel) |
