From d312282f511c100980629b93d7c8cf1b74d7c975 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Thu, 11 Mar 2010 17:37:17 +0000 Subject: [PATCH] [305276] [dstore][multithread] log close in ServerLogger --- .../org/eclipse/dstore/core/server/IServerLogger.java | 8 +++++++- .../src/org/eclipse/dstore/core/server/ServerLogger.java | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java index 862282b2113..ec80fd7d785 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,6 +11,7 @@ * Contributors: * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients + * David McKnight (IBM) - [305276] [dstore][multithread] log close in ServerLogger *******************************************************************************/ package org.eclipse.dstore.core.server; @@ -51,4 +52,9 @@ public interface IServerLogger * @param message Message text to be logged. */ public void logDebugMessage(String minerName, String message); + + /** + * closeLogFileStream + */ + public void closeLogFileStream(); } diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java index f9c45456fe7..1b197b130e8 100644 --- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java +++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2009 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2010 IBM Corporation. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -20,6 +20,7 @@ * David McKnight (IBM) - [271914] [dstore] Setting debug on/off dynamically * David McKnight (IBM) - [269908] [dstore] rsecomm.log file management * David McKnight (IBM) - [284787] [dstore] ability to disable RSECOMM_LOGFILE_MAX option + * David McKnight (IBM) - [305276] [dstore][multithread] log close in ServerLogger ********************************************************************************/ package org.eclipse.dstore.core.server; @@ -105,6 +106,12 @@ public class ServerLogger implements IServerLogger } } + public void closeLogFileStream(){ + if (_logFileStream != null){ + _logFileStream.close(); + } + } + private File getLogFile(String preferredName){ String ext = ".log"; //$NON-NLS-1$ boolean found = false;