[GH-ISSUE #147] [FEATURE REQUEST] Change Logger interface #1058

Closed
opened 2026-03-07 22:04:57 +03:00 by kerem · 1 comment
Owner

Originally created by @hibiken on GitHub (May 5, 2020).
Original GitHub issue: https://github.com/hibiken/asynq/issues/147

Originally assigned to: @hibiken on GitHub.

Is your feature request related to a problem? Please describe.
Current Logger interface is hard to satisfy without writing a wrapper around popular third-party logging libraries (i.e. logrus, zap)

Describe the solution you'd like
Change the interface to the following so that logrus user don't have to write a adapter wrapper around logrus.Logger.

type Logger interface {
    Debug(v ...interface{})
    Info(v ...interface{})
    Warn(v ...interface{})
    Error(v ...interface{})
    Fatal(v ...interface{})
}
Originally created by @hibiken on GitHub (May 5, 2020). Original GitHub issue: https://github.com/hibiken/asynq/issues/147 Originally assigned to: @hibiken on GitHub. **Is your feature request related to a problem? Please describe.** Current `Logger` interface is hard to satisfy without writing a wrapper around popular third-party logging libraries (i.e. `logrus`, `zap`) **Describe the solution you'd like** Change the interface to the following so that `logrus` user don't have to write a adapter wrapper around `logrus.Logger`. ```go type Logger interface { Debug(v ...interface{}) Info(v ...interface{}) Warn(v ...interface{}) Error(v ...interface{}) Fatal(v ...interface{}) } ```
kerem 2026-03-07 22:04:57 +03:00
Author
Owner

@hibiken commented on GitHub (May 16, 2020):

Closed via v.0.9.0

<!-- gh-comment-id:629659916 --> @hibiken commented on GitHub (May 16, 2020): Closed via v.0.9.0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#1058
No description provided.