gov.nasa.arc.brahms.vm.api.components
Interface ILogger


public interface ILogger

The ILogger interface is an interface to the virtual machine's logger allowing for the logging of debug, information, error and warning messages to various log outputs.

Version:
27 May 2004
Author:
Ron van Hoof

Field Summary
static int CONTROLLER_FILTER
          The filter used for filtering debug messages, displays controller related debug messages
static byte DEBUG_MASK
          Mask to enable or disable debug messages
static int ENGINE_FILTER
          The filter used for filtering debug messages, displays engine related debug messages
static byte ERROR_MASK
          Mask to enable or disable error messages
static byte INFO_MASK
          Mask to enable or disable informational messages
static byte LOG_MASK
          Mask to enable or disable logging
static int NOTIFIER_FILTER
          The filter used for filtering debug messages, displays world state related debug messages
static int RSN_FILTER
          The filter used for filtering debug messages, displays reasoning state network related debug messages
static int SCHEDULER_FILTER
          The filter used for filtering debug messages, displays scheduler related debug messages
static byte WARNING_MASK
          Mask to enable or disable warning messages
static int WORLDSTATE_FILTER
          The filter used for filtering debug messages, displays world state related debug messages
 
Method Summary
 void debug(java.lang.String msg)
          Logs the specified message as a debug message in the log.
 void debug(java.lang.String msg, int filter)
          Logs the specified message as a debug message in the log, marking the message for the debug filter.
 void debug(java.lang.Throwable t)
          Logs an error as a debug message in the log file for a Throwable
 void debug(java.lang.Throwable t, int filter)
          Logs an error as a debug message in the log file for a Throwable, marking the message for the debug filter.
 void error(java.lang.String msg)
          Logs the specified message as an error message in the log.
 void error(java.lang.String msg, java.lang.Throwable t)
          Logs the error in the log file
 void error(java.lang.Throwable t)
          Logs an error in the log file for a Throwable
 void info(java.lang.String msg)
          Logs an info message in the log file.
 boolean isDebugEnabled()
          Returns whether the debug mask is set to output debug messages
 boolean isErrorEnabled()
          Returns whether the error mask is set to output error messages
 boolean isInfoEnabled()
          Returns whether the info mask is set to output error messages
 boolean isLoggingEnabled()
          Returns whether logging is enabled
 boolean isWarningEnabled()
          Returns whether the warning mask is set to output error messages
 void warning(java.lang.String msg)
          Logs the specified warning as a warning in the log file.
 

Field Detail

DEBUG_MASK

static final byte DEBUG_MASK
Mask to enable or disable debug messages

See Also:
Constant Field Values

ERROR_MASK

static final byte ERROR_MASK
Mask to enable or disable error messages

See Also:
Constant Field Values

WARNING_MASK

static final byte WARNING_MASK
Mask to enable or disable warning messages

See Also:
Constant Field Values

INFO_MASK

static final byte INFO_MASK
Mask to enable or disable informational messages

See Also:
Constant Field Values

LOG_MASK

static final byte LOG_MASK
Mask to enable or disable logging

See Also:
Constant Field Values

CONTROLLER_FILTER

static final int CONTROLLER_FILTER
The filter used for filtering debug messages, displays controller related debug messages

See Also:
Constant Field Values

ENGINE_FILTER

static final int ENGINE_FILTER
The filter used for filtering debug messages, displays engine related debug messages

See Also:
Constant Field Values

RSN_FILTER

static final int RSN_FILTER
The filter used for filtering debug messages, displays reasoning state network related debug messages

See Also:
Constant Field Values

SCHEDULER_FILTER

static final int SCHEDULER_FILTER
The filter used for filtering debug messages, displays scheduler related debug messages

See Also:
Constant Field Values

WORLDSTATE_FILTER

static final int WORLDSTATE_FILTER
The filter used for filtering debug messages, displays world state related debug messages

See Also:
Constant Field Values

NOTIFIER_FILTER

static final int NOTIFIER_FILTER
The filter used for filtering debug messages, displays world state related debug messages

See Also:
Constant Field Values
Method Detail

isLoggingEnabled

boolean isLoggingEnabled()
Returns whether logging is enabled

Note: This flag has no effect on the mask set for logging. Logging can be enabled but if no mask is set no messages are reported to the log.

Returns:
boolean true if logging is enabled, false otherwise

isDebugEnabled

boolean isDebugEnabled()
Returns whether the debug mask is set to output debug messages

Returns:
boolean true if the debug mask is set, false otherwise

isErrorEnabled

boolean isErrorEnabled()
Returns whether the error mask is set to output error messages

Returns:
boolean true if the error mask is set, false otherwise

isWarningEnabled

boolean isWarningEnabled()
Returns whether the warning mask is set to output error messages

Returns:
boolean true if the warning mask is set, false otherwise

isInfoEnabled

boolean isInfoEnabled()
Returns whether the info mask is set to output error messages

Returns:
boolean true if the info mask is set, false otherwise

debug

void debug(java.lang.String msg)
Logs the specified message as a debug message in the log.

Parameters:
msg - String debug message

debug

void debug(java.lang.Throwable t)
Logs an error as a debug message in the log file for a Throwable

Parameters:
t - Throwable that prompted this log message

debug

void debug(java.lang.String msg,
           int filter)
Logs the specified message as a debug message in the log, marking the message for the debug filter.

Parameters:
msg - String debug message

debug

void debug(java.lang.Throwable t,
           int filter)
Logs an error as a debug message in the log file for a Throwable, marking the message for the debug filter.

Parameters:
t - Throwable that prompted this log message

error

void error(java.lang.String msg)
Logs the specified message as an error message in the log.

Parameters:
msg - String error message

error

void error(java.lang.Throwable t)
Logs an error in the log file for a Throwable

Parameters:
t - Throwable that prompted this log message

error

void error(java.lang.String msg,
           java.lang.Throwable t)
Logs the error in the log file

Parameters:
msg - Message to be written to the log file
t - Throwable that prompted this log message

warning

void warning(java.lang.String msg)
Logs the specified warning as a warning in the log file.

Parameters:
msg - String warning message

info

void info(java.lang.String msg)
Logs an info message in the log file.

Parameters:
msg - String informational message


Copyright © 1997-2012 All Rights Reserved.