Improved code.

This commit is contained in:
Christian P. MOMON 2021-04-25 03:01:56 +02:00
parent b7f9d875f1
commit 77837b3aee

View File

@ -85,16 +85,7 @@ public final class Anonymizer
else else
{ {
System.out.println("== Anonymize log for [" + source.getName() + "]"); System.out.println("== Anonymize log for [" + source.getName() + "]");
boolean isAccessFile = source.getName().contains("access");
boolean isAccessFile;
if (source.getName().contains("access"))
{
isAccessFile = true;
}
else
{
isAccessFile = false;
}
File target; File target;
if (source.getName().endsWith(".log.gz")) if (source.getName().endsWith(".log.gz"))
@ -137,6 +128,12 @@ public final class Anonymizer
anon = anonymizeError(log); anon = anonymizeError(log);
} }
// Make a check.
if (StringUtils.equals(line, anon.getLine()))
{
System.err.println("Anonymize failed detected: " + line);
}
out.println(anon); out.println(anon);
} }
catch (IllegalArgumentException exception) catch (IllegalArgumentException exception)