Skip to content
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

feat: working on migratting off logrus in controller #13916

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

isubasinghe
Copy link
Member

No description provided.

@MasonM
Copy link
Contributor

MasonM commented Nov 19, 2024

You're probably already aware, but one feature of logrus we need is spying on the logging statements in unit tests using https://pkg.go.dev/github.com/sirupsen/logrus/hooks/test. Example:

hook := &logtest.Hook{}
log.AddHook(hook)
defer log.StandardLogger().ReplaceHooks(nil)

To replicate that, I think the Logger interface needs a notion of hooks

@isubasinghe
Copy link
Member Author

Thanks @MasonM, I do plan to tackle this hook issue eventually, I just want to think about the hook thing a bit first before I change the interface, mainly I don't want to add this feature if its only used for tests and I will try to seek a workaround first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants