Set blacklist method for "-service/method".
(method string)
| 151 | |
| 152 | // Set blacklist method for "-service/method". |
| 153 | func (l *logger) setBlacklist(method string) error { |
| 154 | if _, ok := l.config.Blacklist[method]; ok { |
| 155 | return fmt.Errorf("conflicting blacklist rules for method %v found", method) |
| 156 | } |
| 157 | if _, ok := l.config.Methods[method]; ok { |
| 158 | return fmt.Errorf("conflicting method rules for method %v found", method) |
| 159 | } |
| 160 | if l.config.Blacklist == nil { |
| 161 | l.config.Blacklist = make(map[string]struct{}) |
| 162 | } |
| 163 | l.config.Blacklist[method] = struct{}{} |
| 164 | return nil |
| 165 | } |
| 166 | |
| 167 | // getMethodLogger returns the MethodLogger for the given methodName. |
| 168 | // |
no test coverage detected