WithIgnoreMethods sets a list of methods for which no log messages are printed on success.
(methods []string)
| 85 | |
| 86 | // WithIgnoreMethods sets a list of methods for which no log messages are printed on success. |
| 87 | func WithIgnoreMethods(methods []string) Option { |
| 88 | return func(o *options) { |
| 89 | for _, entry := range methods { |
| 90 | method, cfg := parseMethodLogCfg(entry) |
| 91 | o.ignoreMethods[method] = cfg |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // DefaultCodeToLevel is the default implementation of gRPC return codes and interceptor log level for server side. |
| 97 | func DefaultCodeToLevel(code codes.Code) log.Level { |
no test coverage detected