Skip to content

Commit 5d0f5fe

Browse files
authored
update phuslog to fix typo (#499)
1 parent 58a4066 commit 5d0f5fe

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

providers/phuslog/examples_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var (
2222

2323
func Example_initializationWithCustomLevels() {
2424
// Logger is used, allowing pre-definition of certain fields by the user.
25-
logger := log.DefaultLogger.GrcpGateway()
25+
logger := log.DefaultLogger.GrpcGateway()
2626
// Shared options for the logger, with a custom gRPC code to log level function.
2727
opts := []logging.Option{
2828
logging.WithLevels(customFunc),
@@ -40,7 +40,7 @@ func Example_initializationWithCustomLevels() {
4040

4141
func Example_initializationWithDurationFieldOverride() {
4242
// Logger is used, allowing pre-definition of certain fields by the user.
43-
logger := log.DefaultLogger.GrcpGateway()
43+
logger := log.DefaultLogger.GrpcGateway()
4444
// Shared options for the logger, with a custom duration to log field function.
4545
opts := []logging.Option{
4646
logging.WithDurationField(customDurationToFields),
@@ -58,7 +58,7 @@ func Example_initializationWithDurationFieldOverride() {
5858

5959
func ExampleWithDecider() {
6060
// Logger is used, allowing pre-definition of certain fields by the user.
61-
logger := log.DefaultLogger.GrcpGateway()
61+
logger := log.DefaultLogger.GrpcGateway()
6262
// Shared options for the logger, with a custom decider that log everything except successful
6363
// calls from "/blah.foo.healthcheck/Check" method.
6464
opts := []logging.Option{
@@ -85,7 +85,7 @@ func ExampleWithDecider() {
8585

8686
func ExampleServerPayloadLoggingDecider() {
8787
// Logger is used, allowing pre-definition of certain fields by the user.
88-
logger := log.DefaultLogger.GrcpGateway()
88+
logger := log.DefaultLogger.GrpcGateway()
8989
// Expect payload from "/blah.foo.healthcheck/Check" call to be logged.
9090
payloadDecider := func(ctx context.Context, fullMethodName string, servingObject interface{}) bool {
9191
return fullMethodName == "/blah.foo.healthcheck/Check"

providers/phuslog/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ go 1.14
44

55
require (
66
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891
7-
github.com/phuslu/log v1.0.72
7+
github.com/phuslu/log v1.0.80
88
google.golang.org/grpc v1.30.0
99
)

providers/phuslog/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73c
2424
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
2525
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
2626
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
27-
github.com/phuslu/log v1.0.72 h1:bjAbUBXqipXi0TCnpkqArnFSU6qd0U+Js5aATJmRj3g=
28-
github.com/phuslu/log v1.0.72/go.mod h1:kzJN3LRifrepxThMjufQwS7S35yFAB+jAV1qgA7eBW4=
27+
github.com/phuslu/log v1.0.80 h1:spAqKcba2lTTpxp6uBFLSVZrtirHiD4B8UepJdXR0H4=
28+
github.com/phuslu/log v1.0.80/go.mod h1:kzJN3LRifrepxThMjufQwS7S35yFAB+jAV1qgA7eBW4=
2929
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
3030
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
3131
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

providers/phuslog/logger.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ var _ logging.Logger = &Logger{}
1616

1717
// Logger is a phuslog logging adapter compatible with logging middlewares.
1818
type Logger struct {
19-
log.GrcpGatewayLogger
19+
log.GrpcGatewayLogger
2020
}
2121

2222
// InterceptorLogger is a phuslog.Logger to Logger adapter.
23-
func InterceptorLogger(logger log.GrcpGatewayLogger) *Logger {
23+
func InterceptorLogger(logger log.GrpcGatewayLogger) *Logger {
2424
return &Logger{logger}
2525
}
2626

0 commit comments

Comments
 (0)