feat: Add support for logging with context#231
Open
whrss9527 wants to merge 14 commits intohashicorp:mainfrom
Open
feat: Add support for logging with context#231whrss9527 wants to merge 14 commits intohashicorp:mainfrom
whrss9527 wants to merge 14 commits intohashicorp:mainfrom
Conversation
whrss9527
commented
Jun 21, 2024
Author
|
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. |
Author
|
@Ehco1996 Sorry, I clicked by mistake |
mitar
reviewed
Aug 1, 2024
mitar
reviewed
Aug 1, 2024
mitar
reviewed
Aug 1, 2024
mitar
reviewed
Aug 1, 2024
mitar
reviewed
Aug 1, 2024
mitar
approved these changes
Aug 2, 2024
reedip
reviewed
Oct 24, 2024
reedip
left a comment
There was a problem hiding this comment.
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.
reedip
approved these changes
Oct 25, 2024
|
could this be merged pls? |
|
Please merge this in. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for logging with context, you can pass slog to NewContextLogger to print trace or other log information.
#182