|
|
@ -320,6 +320,10 @@ public class DailyRollingFileAppender extends FileAppender { |
|
|
|
if (scheduledFilename.equals(datedFilename)) { |
|
|
|
if (scheduledFilename.equals(datedFilename)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
synchronized (this) { |
|
|
|
|
|
|
|
if (scheduledFilename.equals(datedFilename)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// close current file, and compress it to datedFilename
|
|
|
|
// close current file, and compress it to datedFilename
|
|
|
|
this.closeFile(); |
|
|
|
this.closeFile(); |
|
|
@ -372,12 +376,12 @@ public class DailyRollingFileAppender extends FileAppender { |
|
|
|
// This will also close the file. This is OK since multiple
|
|
|
|
// This will also close the file. This is OK since multiple
|
|
|
|
// close operations are safe.
|
|
|
|
// close operations are safe.
|
|
|
|
this.setFile(fileName, true, this.bufferedIO, this.bufferSize); |
|
|
|
this.setFile(fileName, true, this.bufferedIO, this.bufferSize); |
|
|
|
} |
|
|
|
} catch (IOException e) { |
|
|
|
catch(IOException e) { |
|
|
|
|
|
|
|
errorHandler.error("setFile(" + fileName + ", true) call failed."); |
|
|
|
errorHandler.error("setFile(" + fileName + ", true) call failed."); |
|
|
|
} |
|
|
|
} |
|
|
|
scheduledFilename = datedFilename; |
|
|
|
scheduledFilename = datedFilename; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|