-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws/client: Fix logging to allow it to be enabled per operation (#3778)
Allow logging of operation and request to be enabled per operation, not only per client or session. client := dynamodb.New(sess) var w bytes.Buffer resp, err := client.DescribeTableWithContext(context.TODO(), params, func(r *request.Request) { r.Config.LogLevel = aws.LogLevel(aws.LogDebugWithHTTPBody) r.Config.Logger = aws.LoggerFunc(func(args ...interface{}) { fmt.Fprintln(&w, args...) }) }) if someCondition { log.Printf("Condition met\n%s", w.String()) }
- Loading branch information
Showing
5 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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