Browse Source

Fixed log file pattern.

master
Christian P. MOMON 6 months ago
parent
commit
b7f9d875f1
  1. 6
      src/fr/devinsy/logar/app/Logar.java

6
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)
{

Loading…
Cancel
Save