1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 17:55:39 +02:00

[305276] [dstore][multithread] log close in ServerLogger

This commit is contained in:
David McKnight 2010-03-11 17:37:17 +00:00
parent 4af8ee6277
commit d312282f51
2 changed files with 15 additions and 2 deletions

View file

@ -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();
}

View file

@ -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;