All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.paradoxical.LogMatcher Maven / Gradle / Ivy

There is a newer version: 1.28
Show newest version
package io.paradoxical;

import java.util.regex.Pattern;

public class LogMatcher {
    public static boolean matches(final String log, final String waitForLog, final LogLineMatchFormat matchFormat) {
        switch (matchFormat) {
            case Exact:
                return log.contains(waitForLog);
            case Regex:
                return Pattern.compile(waitForLog).matcher(log).find();
        }

        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy