View Source GRPC.Logger.Client (grpc v0.5.0)
Print log around client rpc calls, like
17:13:33.021 [info] Call say_hello of helloworld.Greeter
17:13:33.079 [info] Got :ok in 58ms
options
Options
:level
- the desired log level. Defaults to:info
:accepted_comparators
- a list with the acceptedLogger.compare_levels(configured_level, Logger.level())
results. Defaults to[:lt, :eq]
usage
Usage
{:ok, channel} = GRPC.Stub.connect("localhost:50051", interceptors: [GRPC.Logger.Client])
# This will log on `:info` and greater priority
{:ok, channel} = GRPC.Stub.connect("localhost:50051", interceptors: [{GRPC.Logger.Client, level: :info}])
# This will log only on `:info`
{:ok, channel} = GRPC.Stub.connect("localhost:50051", interceptors: [{GRPC.Logger.Client, level: :info, accepted_comparators: [:eq]}])
# This will log on `:info` and lower priority
{:ok, channel} = GRPC.Stub.connect("localhost:50051", interceptors: [{GRPC.Logger.Client, level: :info, accepted_comparators: [:eq, :gt]}])