File tree 1 file changed +16
-2
lines changed
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,11 @@ func (l Logger) outputLog(reader io.Reader, outputter output.Outputter) {
228
228
continue
229
229
}
230
230
231
- if match := l .matchRegexes (text ); (match && l .invertRegexp ) || (! l .invertRegexp && ! match ) {
231
+ if l .invertRegexp {
232
+ if ! l .noneMatch (text ) {
233
+ continue
234
+ }
235
+ } else if ! l .match (text ) {
232
236
continue
233
237
}
234
238
@@ -241,7 +245,17 @@ func (l Logger) outputLog(reader io.Reader, outputter output.Outputter) {
241
245
}
242
246
}
243
247
244
- func (l Logger ) matchRegexes (text string ) bool {
248
+ func (l Logger ) noneMatch (text string ) bool {
249
+ for _ , logRegexp := range l .logRegexes {
250
+ if logRegexp .MatchString (text ) {
251
+ return false
252
+ }
253
+ }
254
+
255
+ return true
256
+ }
257
+
258
+ func (l Logger ) match (text string ) bool {
245
259
for _ , logRegexp := range l .logRegexes {
246
260
if ! logRegexp .MatchString (text ) {
247
261
return false
You can’t perform that action at this time.
0 commit comments