elixir-grpc / grpc

An Elixir implementation of gRPC
https://hex.pm/packages/grpc
Apache License 2.0
1.4k stars 214 forks source link

consider show only one type of log when using level option on logger #208

Closed rands0n closed 2 years ago

rands0n commented 3 years ago

Is your feature request related to a problem? Please describe.

When using intercept GRPC.Logger.Server, level: :info. I want to show only this level of the log.

If I do it now, it will transform all logs, even info, warn, and error to the option I specified.

Describe the solution you'd like

I think we could have an option, only: true. This will say that I want only log of this type, and not other types.

Describe alternatives you've considered

None.

Additional context

Not applicable.

AleksandarFilipov commented 2 years ago

Stumbled upon this; you could just "duplicate" GRPC.Logger.Server and modify it according to you needs.