Fixed log file pattern.
This commit is contained in:
parent
d4d1b6038c
commit
b7f9d875f1
@ -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…
Reference in New Issue
Block a user