--- tomcat/trunk/java/org/apache/juli/FileHandler.java 2008/06/10 17:43:28 666232 +++ tomcat/trunk/java/org/apache/juli/FileHandler.java 2008/10/29 21:41:09 709018 @@ -56,7 +56,7 @@ this.prefix = prefix; this.suffix = suffix; configure(); - open(); + openWriter(); } @@ -117,9 +117,9 @@ if (!date.equals(tsDate)) { synchronized (this) { if (!date.equals(tsDate)) { - close(); + closeWriter(); date = tsDate; - open(); + openWriter(); } } } @@ -154,6 +154,10 @@ * Close the currently open log file (if any). */ public void close() { + closeWriter(); + } + + protected void closeWriter() { try { if (writer == null) @@ -193,7 +197,7 @@ String tsString = ts.toString().substring(0, 19); date = tsString.substring(0, 10); - String className = FileHandler.class.getName(); + String className = this.getClass().getName(); //allow classes to override ClassLoader cl = Thread.currentThread().getContextClassLoader(); @@ -250,7 +254,11 @@ /** * Open the new log file for the date specified by date. */ - private void open() { + protected void open() { + openWriter(); + } + + protected void openWriter() { // Create the directory if necessary File dir = new File(directory);