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

This commit is contained in:
blotus 2021-09-23 13:52:05 +02:00 committed by GitHub
parent bd5c119f85
commit f0db3742de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {