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

logger: add wrapper to options #174

Open
vtolstov opened this issue Jan 25, 2023 · 0 comments
Open

logger: add wrapper to options #174

vtolstov opened this issue Jan 25, 2023 · 0 comments

Comments

@vtolstov
Copy link
Member

  • specify wrappers as logger.Option
  • if wrapper have called method - run it before original logger method
  • if wrapper does not have called method - run original logger method
  • implement wrapper that based on some ctx value override logger level - to be able to see debug logs for specific request or specific user ip (remote host addr). wrapper contains two parts - one is wrapper for server subscriber and for server handler that injects some stuff to ctx, another - logger wrapper that returns calls not logger.V method, but logger.VContext(ctx, logger.Level)
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