Make FINEST matcher logging options available to end users
This commit is contained in:
parent
862d181c29
commit
cb79fe71b5
|
@ -7,7 +7,6 @@ import java.util.logging.Handler;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.logging.SimpleFormatter;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.filebot.util.SystemProperty;
|
||||
|
@ -19,7 +18,6 @@ public final class Logging {
|
|||
private static final SystemProperty<Level> debugLevel = SystemProperty.of("net.filebot.logging.debug", Level::parse, Level.CONFIG);
|
||||
private static final SystemProperty<Pattern> anonymizePattern = SystemProperty.of("net.filebot.logging.anonymize", s -> Pattern.compile(s, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CHARACTER_CLASS | Pattern.MULTILINE));
|
||||
|
||||
public static final Logger global = getConsoleLogger("net.filebot", Level.ALL, new SimpleFormatter());
|
||||
public static final Logger log = getConsoleLogger("net.filebot.console", Level.ALL, new ConsoleFormatter(anonymizePattern.get()));
|
||||
public static final Logger debug = getConsoleLogger("net.filebot.debug", debugLevel.get(), new ConsoleFormatter(anonymizePattern.get()));
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.filebot.similarity;
|
||||
|
||||
import static java.util.Collections.*;
|
||||
import static net.filebot.Logging.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
|
@ -139,7 +140,7 @@ public class Matcher<V, C> {
|
|||
float similarity = metric.getSimilarity(possibleMatch.getValue(), possibleMatch.getCandidate());
|
||||
|
||||
// DEBUG
|
||||
// System.out.format("%s: %.04f: %s%n", metric, similarity, possibleMatch);
|
||||
debug.finest(format("%s: %.04f: %s", metric, similarity, possibleMatch));
|
||||
|
||||
Set<Match<V, C>> matchSet = similarityMap.get(similarity);
|
||||
if (matchSet == null) {
|
||||
|
|
Loading…
Reference in New Issue