logger: add wrapper to options #174
vtolstov
commented 2023-01-25 23:35:02 +03:00
(Migrated from github.com)
- 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)
- 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)
vtolstov
closed this issue 2024-03-13 17:09:58 +03:00
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: unistack-org/micro#174
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?