-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a more direct way to pass a context to a Handler. - Add {Info,Debug,Warn,Error}Ctx functions and methods, that take a context. - Add an initial context argument to Log and LogAttrs. - Remove Logger.WithContext, Logger.Context and the Record.Context field: the output functions will pass their context argument directly to the Handler. This CL also includes a somewhat unrelated set of changes: - Add the Record.Add(...any) method, which behaves like Record.AddAttrs but processes its arguments like Logger.Log. - Remove LogDepth and LogAttrsDepth, since they can now be implemented with exported API. A later CL will update the package documentation. Change-Id: I9216615598e1582a28fd48d78e85ff019d223924 Reviewed-on: https://go-review.googlesource.com/c/exp/+/469856 Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
- Loading branch information
Showing
8 changed files
with
124 additions
and
122 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
Oops, something went wrong.