File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
pkg/systemlogmonitor/logwatchers/filelog Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ func (s *filelogWatcher) watchLoop() {
134
134
}
135
135
136
136
func (s * filelogWatcher ) filterSkipList (line string ) bool {
137
- for _ , skipItem := range s .cfg .SkipList {
137
+ for _ , skipItem := range s .cfg .SkipList {
138
138
if strings .Contains (line , skipItem ) {
139
139
return true
140
140
}
Original file line number Diff line number Diff line change @@ -185,22 +185,21 @@ func TestFilterSkipList(t *testing.T) {
185
185
},
186
186
},
187
187
}
188
- testcase := []struct {
189
- log string
188
+ testcase := []struct {
189
+ log string
190
190
expect bool
191
191
}{
192
192
{
193
- log : `Jan 2 03:04:03 kernel: [0.000000] 1` ,
193
+ log : `Jan 2 03:04:03 kernel: [0.000000] 1` ,
194
194
expect : false ,
195
195
},
196
196
{
197
- log : `Jan 2 03:04:04 audit: [1.000000] 2` ,
197
+ log : `Jan 2 03:04:04 audit: [1.000000] 2` ,
198
198
expect : true ,
199
199
},
200
200
{
201
- log : `Jan 2 03:04:05 kubelet: [2.000000] 3` ,
201
+ log : `Jan 2 03:04:05 kubelet: [2.000000] 3` ,
202
202
expect : true ,
203
-
204
203
},
205
204
}
206
205
for i , test := range testcase {
You can’t perform that action at this time.
0 commit comments