Remote System Explorer DataStore
Release 3.0

org.eclipse.dstore.core.server
Class ServerLogger

java.lang.Object
  extended by org.eclipse.dstore.core.server.ServerLogger
All Implemented Interfaces:
IServerLogger

public class ServerLogger
extends Object
implements IServerLogger

Class that facilitates logging for errors, warnings, debug messages and info for DataStore servers.

Since:
3.0 moved from non-API to API

Field Summary
static boolean DEBUG
          Switch to enable debug-level logging.
 
Constructor Summary
ServerLogger(String logPathName)
          Constructs a new ServerLogger.
 
Method Summary
 void logDebugMessage(String minerName, String message)
          Logs a debug message
 void logError(String minerName, String message, Throwable exception)
          Logs an error message
 void logInfo(String minerName, String message)
          Logs an informational message
 void logWarning(String minerName, String message)
          Logs a warning message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Switch to enable debug-level logging. Note that, in 3.0, this variable was final but, as of 3.0.1, it's not.

Constructor Detail

ServerLogger

public ServerLogger(String logPathName)
Constructs a new ServerLogger.

Parameters:
logPathName - the path on the filesystem to store the log information
Method Detail

logInfo

public void logInfo(String minerName,
                    String message)
Logs an informational message

Specified by:
logInfo in interface IServerLogger
Parameters:
minerName - the name of the miner associated with this message
message - Message text to be logged.

logWarning

public void logWarning(String minerName,
                       String message)
Logs a warning message

Specified by:
logWarning in interface IServerLogger
Parameters:
minerName - the name of the miner associated with this message
message - Message text to be logged.

logError

public void logError(String minerName,
                     String message,
                     Throwable exception)
Logs an error message

Specified by:
logError in interface IServerLogger
Parameters:
minerName - the name of the miner associated with this message
message - Message text to be logged.
exception - Exception that generated the error. Used to print a stack trace.

logDebugMessage

public void logDebugMessage(String minerName,
                            String message)
Logs a debug message

Specified by:
logDebugMessage in interface IServerLogger
Parameters:
minerName - the name of the miner associated with this message
message - Message text to be logged.

Remote System Explorer DataStore
Release 3.0

Guidelines for using DataStore APIs.