Fixed log file pattern.
This commit is contained in:
parent
d4d1b6038c
commit
b7f9d875f1
1 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ public final class Logar
|
||||||
{
|
{
|
||||||
private static Logger logger = LoggerFactory.getLogger(Logar.class);
|
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.
|
* Instantiates a new log tool.
|
||||||
|
@ -93,7 +93,7 @@ public final class Logar
|
||||||
anonymizer.loadMapTable(mapFile);
|
anonymizer.loadMapTable(mapFile);
|
||||||
System.out.println("Table size=" + anonymizer.getMapTable().size());
|
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());
|
logger.info("file count={}", files.size());
|
||||||
for (File file : files)
|
for (File file : files)
|
||||||
{
|
{
|
||||||
|
@ -501,7 +501,7 @@ public final class Logar
|
||||||
*/
|
*/
|
||||||
public static void testConcate(final File source)
|
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)
|
for (File file : files)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue