summaryrefslogtreecommitdiffstats
path: root/base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java')
-rw-r--r--base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java b/base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java
index 0a7a9f098..32568dac0 100644
--- a/base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java
+++ b/base/server/cms/src/com/netscape/cms/logging/RollingLogFile.java
@@ -139,6 +139,7 @@ public class RollingLogFile extends LogFile {
* Shutdown this log file.
*/
public synchronized void shutdown() {
+ CMS.debug("Destroying RollingLogFile(" + mFileName + ")");
setRolloverTime("0");
setExpirationTime("0");
super.shutdown();
@@ -157,6 +158,9 @@ public class RollingLogFile extends LogFile {
mRolloverThread = new RolloverThread();
mRolloverThread.setDaemon(true);
mRolloverThread.start();
+
+ } else if (mRolloverThread != null && mRolloverInterval == 0) {
+ mRolloverThread.interrupt();
}
this.notify();
@@ -190,6 +194,10 @@ public class RollingLogFile extends LogFile {
mExpirationThread.setDaemon(true);
mExpirationThread.start();
}
+
+ } else if (mExpirationThread != null && mExpirationTime == 0) {
+ mExpirationThread.interrupt();
+
} else {
mExpLock.notify();
}
@@ -401,9 +409,7 @@ public class RollingLogFile extends LogFile {
try {
RollingLogFile.this.wait(mRolloverInterval);
} catch (InterruptedException e) {
- // This shouldn't happen very often
- CMS.getLogger().getLogQueue().log(new
- SystemEvent(CMS.getUserMessage("CMS_LOG_THREAD_INTERRUPT", "rollover")));
+ // shutdown
}
}
@@ -475,11 +481,13 @@ public class RollingLogFile extends LogFile {
try {
mExpLock.wait(sleepTime);
} catch (InterruptedException e) {
- // This shouldn't happen very often
- ConsoleError.send(new
- SystemEvent(CMS.getUserMessage("CMS_LOG_THREAD_INTERRUPT", "expiration")));
+ // shutdown
}
}
+
+ if (mExpirationTime == 0) {
+ break;
+ }
}
}
mExpirationThread = null;