浏览代码

fix usage of regex.Match in cloudwatch module (#986)

blotus 3 年之前
父节点
当前提交
f0db3742de
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/acquisition/modules/cloudwatch/cloudwatch.go

+ 1 - 1
pkg/acquisition/modules/cloudwatch/cloudwatch.go

@@ -329,7 +329,7 @@ func (cw *CloudwatchSource) LogStreamManager(in chan LogStreamTailConfig, outCha
 			}
 
 			if cw.Config.StreamRegexp != nil {
-				match, err := regexp.Match(newStream.StreamName, []byte(*cw.Config.StreamRegexp))
+				match, err := regexp.Match(*cw.Config.StreamRegexp, []byte(newStream.StreamName))
 				if err != nil {
 					cw.logger.Warningf("invalid regexp : %s", err)
 				} else {