View Source GRPC.Client.Interceptors.Logger (grpc v0.8.1)

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

  • :level - the desired log level. Defaults to :info

Usage

{:ok, channel} = GRPC.Stub.connect("localhost:50051", interceptors: [GRPC.Client.Interceptors.Logger])

Usage with custom level

{:ok, channel} = GRPC.Stub.connect("localhost:50051", interceptors: [{GRPC.Client.Interceptors.Logger, level: :warning}])