diff --git a/org.adempiere.base/src/org/adempiere/util/LogAuthFailure.java b/org.adempiere.base/src/org/adempiere/util/LogAuthFailure.java index 9623de84db..a7b93aeefa 100644 --- a/org.adempiere.base/src/org/adempiere/util/LogAuthFailure.java +++ b/org.adempiere.base/src/org/adempiere/util/LogAuthFailure.java @@ -35,13 +35,14 @@ public class LogAuthFailure { private static FileOutputStream file = null; private static Writer writer; + public static String authFailureFilename = "AuthFailure.log"; /** Logger */ private static CLogger log = CLogger.getCLogger(LogAuthFailure.class); public LogAuthFailure() { String path = Ini.getAdempiereHome() + File.separator + "log"; - String name = path + File.separator + "AuthFailure.log"; + String name = path + File.separator + authFailureFilename; File fileName; try { fileName = new File(name); diff --git a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java index b48c4218e7..50dfcd4a05 100644 --- a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java +++ b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java @@ -39,6 +39,7 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.adempiere.util.LogAuthFailure; import org.apache.ecs.HtmlColor; import org.apache.ecs.xhtml.a; import org.apache.ecs.xhtml.b; @@ -382,6 +383,8 @@ public class AdempiereMonitor extends HttpServlet String fileName = logs[i].getAbsolutePath(); if (fileName.equals(fileHandler.getFileName())) continue; + if (fileName.endsWith(LogAuthFailure.authFailureFilename)) // Do not delete login failure + continue; if (logs[i].delete()) log.warning("Deleted: " + fileName); else