22
22
23
23
func Example_initializationWithCustomLevels () {
24
24
// Logger is used, allowing pre-definition of certain fields by the user.
25
- logger := log .DefaultLogger .GrcpGateway ()
25
+ logger := log .DefaultLogger .GrpcGateway ()
26
26
// Shared options for the logger, with a custom gRPC code to log level function.
27
27
opts := []logging.Option {
28
28
logging .WithLevels (customFunc ),
@@ -40,7 +40,7 @@ func Example_initializationWithCustomLevels() {
40
40
41
41
func Example_initializationWithDurationFieldOverride () {
42
42
// Logger is used, allowing pre-definition of certain fields by the user.
43
- logger := log .DefaultLogger .GrcpGateway ()
43
+ logger := log .DefaultLogger .GrpcGateway ()
44
44
// Shared options for the logger, with a custom duration to log field function.
45
45
opts := []logging.Option {
46
46
logging .WithDurationField (customDurationToFields ),
@@ -58,7 +58,7 @@ func Example_initializationWithDurationFieldOverride() {
58
58
59
59
func ExampleWithDecider () {
60
60
// Logger is used, allowing pre-definition of certain fields by the user.
61
- logger := log .DefaultLogger .GrcpGateway ()
61
+ logger := log .DefaultLogger .GrpcGateway ()
62
62
// Shared options for the logger, with a custom decider that log everything except successful
63
63
// calls from "/blah.foo.healthcheck/Check" method.
64
64
opts := []logging.Option {
@@ -85,7 +85,7 @@ func ExampleWithDecider() {
85
85
86
86
func ExampleServerPayloadLoggingDecider () {
87
87
// Logger is used, allowing pre-definition of certain fields by the user.
88
- logger := log .DefaultLogger .GrcpGateway ()
88
+ logger := log .DefaultLogger .GrpcGateway ()
89
89
// Expect payload from "/blah.foo.healthcheck/Check" call to be logged.
90
90
payloadDecider := func (ctx context.Context , fullMethodName string , servingObject interface {}) bool {
91
91
return fullMethodName == "/blah.foo.healthcheck/Check"
0 commit comments