-
Notifications
You must be signed in to change notification settings - Fork 253
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
feat: Add support for logging with context #231
base: main
Are you sure you want to change the base?
Conversation
I want to make the logging code as concise and brief as possible, while ensuring the API is user-friendly and compatible with mainstream Golang logging frameworks, such as the increasingly common slog. If you have a better implementation, I am open to learning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
ptal @manicminer
@Ehco1996 Sorry, I clicked by mistake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line #445 in the new code, the comment states that the Custom Logger can be Logger or Leveled Logger. Maybe that can be changed?
This is just a nit, and mainly because I was trying to go through this Client structure and found it.
Add support for logging with context, you can pass slog to NewContextLogger to print trace or other log information.
#182