gateway
gateway copied to clipboard
Decision: How to Pass Logger
A logger gets passed around a few different ways throughout EG. Let's make a decision on which approach should be used for the project. ~Making this decision will unblock #278~:
- Pass a context and individual funcs can create a logger from the context.
- Pass
logr.Loggeras an input to funcs. - Add a
logr.Loggerto go structs andlog.NewLogger()when initializing the struct.
@arkodg @LukeShu @youngnick @skriss I request your vote on this issue ~so we can unblock #344~.
I vote for option 1.
I vote for option 1.
I wrote some about why/when I believe that context.Context-passing is the right decision over at https://github.com/datawire/dlib/blob/master/README.md#design-principles
I think option 1 is preferable.
I'll abstain, fine with whatever others prefer.
I prefer option 4 - Add global library logging scopes This simplifies enabling component level logging and is also used in istio (here's an example) More info on this is in https://github.com/envoyproxy/gateway/issues/76#issuecomment-1149604515
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.
Reopened so we can discuss and bring it to closure in the future.