com.esf.core.logger.service
Interface IEsfLoggerService


public interface IEsfLoggerService

Event logging service to pass event messages at varying severity levels to system log.


Field Summary
static int LOG_LEVEL_DEBUG
          Log level for debugging messages (but not lengthy dumps of information such as byte streams).
static int LOG_LEVEL_DUMP
          Log level for data dumps, such as list of hex bytes from serial streams, etc.
static int LOG_LEVEL_ERROR
          Log level for only errors (something didn't work as expected).
static int LOG_LEVEL_INFO
          Log level for informational messages about the status of the process.
static int LOG_LEVEL_NONE
          Set process to LOG_LEVEL_NONE if no event messages are desired to be sent to system log.
static int LOG_LEVEL_WARNING
          Log level for warning events (may or may not be a problem).
static java.lang.String SERVICE_NAME
          Reports the class name representing this interface.
 
Method Summary
 int getLevel()
          Gets the logLevel for a process.
 int getLevel(java.lang.String symbolicName)
          this is a method to get the log level of any bundle that is using the log service by its bundle symbolic name.
 void logDebug(java.lang.String message)
          Generates a debug level logging message (LOG_LEVEL_DEBUG).
 void logDump(byte[] message)
          Generates a dump level logging message (LOG_LEVEL_DUMP).
 void logDump(java.lang.String message)
          Generates a dump level logging message (LOG_LEVEL_DUMP).
 void logError(java.lang.String message)
          Generates an error level logging message (LOG_LEVEL_ERROR).
 void logInfo(java.lang.String message)
          Generates a info level logging message (LOG_LEVEL_INFO).
 void logWarning(java.lang.String message)
          Generates a warning level logging message (LOG_LEVEL_WARNING).
 void setLevel(int logLevel)
          Sets the logLevel for a process.
 void setLevel(java.lang.String logLevel)
          Sets the logLevel for a process.
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
Reports the class name representing this interface.


LOG_LEVEL_NONE

public static final int LOG_LEVEL_NONE
Set process to LOG_LEVEL_NONE if no event messages are desired to be sent to system log.

See Also:
Constant Field Values

LOG_LEVEL_ERROR

public static final int LOG_LEVEL_ERROR
Log level for only errors (something didn't work as expected).

See Also:
Constant Field Values

LOG_LEVEL_WARNING

public static final int LOG_LEVEL_WARNING
Log level for warning events (may or may not be a problem).

See Also:
Constant Field Values

LOG_LEVEL_INFO

public static final int LOG_LEVEL_INFO
Log level for informational messages about the status of the process.

See Also:
Constant Field Values

LOG_LEVEL_DEBUG

public static final int LOG_LEVEL_DEBUG
Log level for debugging messages (but not lengthy dumps of information such as byte streams).

See Also:
Constant Field Values

LOG_LEVEL_DUMP

public static final int LOG_LEVEL_DUMP
Log level for data dumps, such as list of hex bytes from serial streams, etc.

See Also:
Constant Field Values
Method Detail

setLevel

public void setLevel(int logLevel)
              throws java.lang.Exception
Sets the logLevel for a process.

Parameters:
logLevel - the logging level to use, as int
Throws:
java.lang.Exception - if there is a problem setting the level

setLevel

public void setLevel(java.lang.String logLevel)
              throws java.lang.Exception
Sets the logLevel for a process.

Parameters:
logLevel - the logging level to use, as String, such as "LOG_LEVEL_INFO".
Throws:
java.lang.Exception - if there is a problem setting the level

getLevel

public int getLevel()
Gets the logLevel for a process.

Returns:
the logLevel as int

logError

public void logError(java.lang.String message)
Generates an error level logging message (LOG_LEVEL_ERROR).

Parameters:
message - the message to be generated, as String

logWarning

public void logWarning(java.lang.String message)
Generates a warning level logging message (LOG_LEVEL_WARNING).

Parameters:
message - the message to be generated, as String

logInfo

public void logInfo(java.lang.String message)
Generates a info level logging message (LOG_LEVEL_INFO).

Parameters:
message - the message to be generated, as String

logDebug

public void logDebug(java.lang.String message)
Generates a debug level logging message (LOG_LEVEL_DEBUG).

Parameters:
message - the message to be generated, as String

logDump

public void logDump(java.lang.String message)
Generates a dump level logging message (LOG_LEVEL_DUMP).

Parameters:
message - the message to be generated, as String

logDump

public void logDump(byte[] message)
Generates a dump level logging message (LOG_LEVEL_DUMP).

Parameters:
message - the message to be generated, as a byte array

getLevel

public int getLevel(java.lang.String symbolicName)
this is a method to get the log level of any bundle that is using the log service by its bundle symbolic name.

Parameters:
symbolicName - the symbolic name of the bundle to get the log level of
Returns:
an int representing the log level of the specified bundle


Copyright © 2009 Eurotech Inc. All rights reserved.