From d047d174c2a9d534f24797e5fba80987a41b3d21 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Mon, 26 Apr 2021 01:31:39 +0200 Subject: [PATCH] Fixed anonymize access log check. --- src/fr/devinsy/logar/app/anonymizer/Anonymizer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fr/devinsy/logar/app/anonymizer/Anonymizer.java b/src/fr/devinsy/logar/app/anonymizer/Anonymizer.java index 6f9443a..d085288 100644 --- a/src/fr/devinsy/logar/app/anonymizer/Anonymizer.java +++ b/src/fr/devinsy/logar/app/anonymizer/Anonymizer.java @@ -118,6 +118,12 @@ public final class Anonymizer // logger.info("anon=[{}][{}][{}]", anon.getIp(), // anon.getUser(), anon.getDatetime()); // logger.info("anon={}", anon); + + // Make a check. + if (StringUtils.equals(line, anon.getLine())) + { + System.err.println("Anonymize failed detected: " + line); + } } else { @@ -126,12 +132,6 @@ public final class Anonymizer anon = anonymizeError(log); } - // Make a check. - if (StringUtils.equals(line, anon.getLine())) - { - System.err.println("Anonymize failed detected: " + line); - } - out.println(anon); } catch (IllegalArgumentException exception)