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

PoC: light-weight compile time dependency injection for logger #4085

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

justadreamer
Copy link
Contributor

This PR accompanies the proposal: #4084. It demonstrates how different loggers can be easily swapped in compile-time, however leaving the possibility to also swap a global instance in runtime (during tests f.e.)

The key files are di/di.go, di/interfaces, di/providers

This is mainly to illustrate the point of the discussion and certainly not for immediate merging.

@hhhjort
Copy link
Collaborator

hhhjort commented Dec 4, 2024

I think we want to add something about the compile time usage of this feature to the README. Mention the default, and how to compile the alternate logger in.

@justadreamer
Copy link
Contributor Author

@bsardo mentioned that a similar thing is done with the time package - will take a look

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