func (verifier *LogVerifier) MatchedErrorsCount() int {
	return verifier.cnt
}
MatchedErrorsCount returns verifier.cnt, which represent the number of found errors matching a given string
package event
import (
	"strings"
	"github.com/sirupsen/logrus"
)
type LogVerifier struct {
	expectedMessage string
	isError         bool
	cnt             int
}
func NewLogVerifier(expectedMessage string, isError bool) *LogVerifier {
	return &LogVerifier{expectedMessage: expectedMessage, isError: isError}
}
func (verifier *LogVerifier) Levels() []logrus.Level {
	return logrus.AllLevels
}
func (verifier *LogVerifier) Fire(e *logrus.Entry) error {
	if len(verifier.expectedMessage) > 0 && strings.Contains(e.Message, verifier.expectedMessage) {
		if !verifier.isError || (verifier.isError && e.Level == logrus.ErrorLevel) {
			verifier.cnt++
		}
	}
	return nil
}