diff --git a/src/fr/devinsy/logar/app/Logar.java b/src/fr/devinsy/logar/app/Logar.java index fc7774b..160d815 100644 --- a/src/fr/devinsy/logar/app/Logar.java +++ b/src/fr/devinsy/logar/app/Logar.java @@ -47,7 +47,7 @@ public final class Logar { private static Logger logger = LoggerFactory.getLogger(Logar.class); - public static String LOGFILE_PATTERN = "^.+\\.(log|log\\.\\d+|log\\.gz|log\\.gz\\.\\d+)"; + public static String LOGFILE_PATTERN = "^.+(\\.|_)(log|log\\.gz|log\\.\\d+|log\\.\\d+\\.gz)$"; /** * Instantiates a new log tool. @@ -93,7 +93,7 @@ public final class Logar anonymizer.loadMapTable(mapFile); System.out.println("Table size=" + anonymizer.getMapTable().size()); - Files files = FilesUtils.searchEndingWith(source, ".log", ".log.gz").keepFileType().removeContaining("-anon.log"); + Files files = FilesUtils.searchEndingWith(source, ".log", ".log.gz").keepFileType().removeContaining("-anon.log").sortByName(); logger.info("file count={}", files.size()); for (File file : files) { @@ -501,7 +501,7 @@ public final class Logar */ public static void testConcate(final File source) { - Files files = FilesUtils.searchEndingWith(source, ".log", ".log.gz").keepFileType().removeContaining("-anon.log"); + Files files = FilesUtils.searchEndingWith(source, ".log", ".log.gz").keepFileType().removeContaining("-anon.log").sortByName(); for (File file : files) {