-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(logger): Drop logger generic #2460
Conversation
Signed-off-by: aBear <abear@berachain.com>
b2b82ae
to
416da88
Compare
416da88
to
9ee8e15
Compare
9ee8e15
to
08b5b09
Compare
08b5b09
to
37893d9
Compare
) | ||
|
||
type SDKLogger[LoggerT log.AdvancedLogger[LoggerT]] struct { | ||
log.AdvancedLogger[LoggerT] | ||
type SDKLogger struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: check if we can drop this type and what interface it is implementing (to assert it)
cmtlog "github.com/cometbft/cometbft/libs/log" | ||
) | ||
|
||
type CometLogger[LoggerT log.AdvancedLogger[LoggerT]] struct { | ||
log.AdvancedLogger[LoggerT] | ||
type CometLogger struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: check if we can drop this type and what interface it is implementing (to assert it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yebb I don't think CometLogger and SDKLogger are doing much as is
@abi87 I already did this as part of https://github.com/berachain/beacon-kit-internal/pull/59, I didn't want to merge that in so soon before mainnet launch as I combined it with changing logger to use the standard slog logger |
I recall that. I think that PR is doing too much. I am down merging in the log generics cleanup quickly, I would take more care in switching the log library we use. Would you consider splitting your PR like this? I can close this one |
@fridrik01 here you are an interesting post about the use of interfaces in our logger!! |
lol, this makes the code so less readable. |
Nah, I think since you already did this again in a separate PR we go with that. You are right, these should be separate PRs anyway. Btw, the change from phuslu to slog is still something that would be nice to do eventually, but not the right time before mainnet launch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
cmtlog "github.com/cometbft/cometbft/libs/log" | ||
) | ||
|
||
type CometLogger[LoggerT log.AdvancedLogger[LoggerT]] struct { | ||
log.AdvancedLogger[LoggerT] | ||
type CometLogger struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yebb I don't think CometLogger and SDKLogger are doing much as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Signed-off-by: aBear <abear@berachain.com>
Signed-off-by: aBear <abear@berachain.com>
Cleaned up the logger generics.
Apologies to @fridrik01 for stealing this