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

Add context.Context fields support and customized values #3

Open
matdurand opened this issue May 5, 2023 · 0 comments
Open

Add context.Context fields support and customized values #3

matdurand opened this issue May 5, 2023 · 0 comments

Comments

@matdurand
Copy link

Great job creating something akin to slf4j.

Some things I would love to see in the lib before I can adopt this:

  • Support for context.Context: It's often useful to be able to access values from the context while logging. The obvious example is traceID. slog has these DebugCtx, InfoCtx ... methods for this. I feel like their implementation is a bit rough on the edges atm and it's not obvious how to use it, but still, the need for something like this is obvious I think. Which form it should take, I'm not sure...
  • Support for customization when logging values: Again, borrowing from the slog handbook, the ability to centralized the logic for how a value is logged is useful. For example, when redacting secrets from logs. I understand that this might be a problem for dazl to support this for each underlaying implementation, but maybe that could be addressed by dazl and it would pass down the serialized value (after the redaction for example) to the implementation.
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

No branches or pull requests

1 participant