-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
value in log kv pairs can be any type
Fixes #38 hclog can properly handle interface{} types. Therefore, don't try to turn the type into a string and just serialize the interface{}. The serialization is done via JSON on stderr so this will effectively and safely support any Go type witout panic. On the other side, hclog will do a `fmt` with `%#v` for any type it can't natively support outputting. This makes it safe to send directly to hclog. While I was doing this work, I modified the test to also run against grpc, so we can verify that grpc plugin logging works as well. This should've been the case (and was) since the logging code is not specific to protocols, but its good to gain coverage.
- Loading branch information
Showing
6 changed files
with
226 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package grpctest | ||
|
||
//go:generate protoc -I ./ ./test.proto --go_out=plugins=grpc:. |
Oops, something went wrong.