mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 23:45:52 +03:00
[GH-ISSUE #684] [BUG] The call stack depth of Logger.Infof() and Logger.Info() should be the same #1355
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#1355
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xuyang2 on GitHub (Jul 10, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/684
Originally assigned to: @hibiken on GitHub.
The call stack depth of Infof() and Info() should be the same,otherwise the logger cannot use the same
callerSkipnumber to get the file and line number of the code that calls the logger.Step to produce:
wrap a zap.Logger,pass it to asynq.NewScheduler(), start the Scheduler
expected output:
actual output:
Cause:
Logger.Infof() calls Logger.Info()
github.com/hibiken/asynq@123d560a44/scheduler.go (L223C17-L224)@xuyang2 commented on GitHub (Jul 10, 2023):
I think this can be fixed by a little copying:
( And checking with canLogAt() before fmt.Sprintf() can also improve performance )