Authentication
API v8.1 SP2

com.rsa.authagent.authapi.logger
Class AgentDebugger

java.lang.Object
  extended by com.rsa.authagent.authapi.logger.AbstractLogger
      extended by com.rsa.authagent.authapi.logger.AgentDebugger

public class AgentDebugger
extends AbstractLogger

Debugger for logging trace messages.

At static initialization, the debugger loads configuration parameters from the AgentProperties object. If the debugger is enabled and filters are set, trace messages will be sent to the specified output destinations.


Field Summary
static int DEBUG_ALL
          Allows all traces to be logged.
static int DEBUG_ENTRY
          Allows method entry traces to be logged.
static int DEBUG_EXIT
          Allows method exit traces to be logged.
static int DEBUG_FLOW
          Allows control flow traces to be logged.
static int DEBUG_NORMAL
          Allows normal traces to be logged.
 
Fields inherited from class com.rsa.authagent.authapi.logger.AbstractLogger
LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_OFF, LOG_WARN, RSA_LOG_DEBUG, RSA_LOG_ERROR, RSA_LOG_FATAL, RSA_LOG_INFO, RSA_LOG_OFF, RSA_LOG_WARN
 
Method Summary
static void addDebugFilter(int newFilter)
          Adds a new set of filters to the debugger.
static void addOutput(LoggerOutput output)
           
static void clearDebugFilters()
          Clears all existing filters in the debugger.
static void enableDebug(boolean enabled)
          Enable debug logging.
static java.lang.String formatHex(byte[] buf, java.lang.String header)
          Formats a binary byte array into printable hex string.
static int getDebugFilter()
          Returns the current set of debug filters.
static boolean isDebugEnabled()
          Checks whether or not the debugger is enabled.
static void loadAgentProperties()
          Reloads configuration parameters from the default and System properties.
static void loadAgentProperties(AgentProperties agProps)
           
static void removeAllOutputs()
           
static void trace(int idMsg)
          Logs a trace message specified by an ID.
static void trace(java.lang.String szMsg)
          Logs a trace message.
static void traceEntry(java.lang.String szMsg)
          Logs a method entry trace message.
static void traceExit(java.lang.String szMsg)
          Logs a method exit trace message.
static void traceFlow(java.lang.String szMsg)
          Logs a control flow trace message.
static void traceNormal(java.lang.String szMsg)
          Logs a normal trace message.
 
Methods inherited from class com.rsa.authagent.authapi.logger.AbstractLogger
removeAllOutputs
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_NORMAL

public static final int DEBUG_NORMAL
Allows normal traces to be logged.

See Also:
Constant Field Values

DEBUG_ENTRY

public static final int DEBUG_ENTRY
Allows method entry traces to be logged.

See Also:
Constant Field Values

DEBUG_EXIT

public static final int DEBUG_EXIT
Allows method exit traces to be logged.

See Also:
Constant Field Values

DEBUG_FLOW

public static final int DEBUG_FLOW
Allows control flow traces to be logged.

See Also:
Constant Field Values

DEBUG_ALL

public static final int DEBUG_ALL
Allows all traces to be logged.

See Also:
Constant Field Values
Method Detail

isDebugEnabled

public static boolean isDebugEnabled()
Checks whether or not the debugger is enabled.

Returns:
true if the debugger is enabled; false otherwise.

enableDebug

public static void enableDebug(boolean enabled)
Enable debug logging.

Parameters:
enabled - true to enable; false to disable.

addDebugFilter

public static void addDebugFilter(int newFilter)
Adds a new set of filters to the debugger. New filters can be logically OR'ed together. Filters are accumulative. To remove existing filters, use clearDebugFilters()first.

Parameters:
newFilter - the new set of filters to be added.
See Also:
DEBUG_ENTRY, DEBUG_EXIT, DEBUG_FLOW, DEBUG_NORMAL, DEBUG_ALL

getDebugFilter

public static int getDebugFilter()
Returns the current set of debug filters.

Returns:
filters.
See Also:
addDebugFilter(int)

clearDebugFilters

public static void clearDebugFilters()
Clears all existing filters in the debugger.


addOutput

public static void addOutput(LoggerOutput output)
See Also:
AbstractLogger.addOutput(com.rsa.authagent.authapi.logger.LoggerOutput)

removeAllOutputs

public static void removeAllOutputs()
See Also:
AbstractLogger.removeAllOutputs(Logger)

formatHex

public static java.lang.String formatHex(byte[] buf,
                                         java.lang.String header)
Formats a binary byte array into printable hex string.

Parameters:
buf - buffer containing the binary data.
header - an optional header string (can be null).
Returns:
the String object containing the printable hex characters.

trace

public static void trace(java.lang.String szMsg)
Logs a trace message. The message will be logged if any one of the filter is set.

Parameters:
szMsg - the message string.

traceEntry

public static void traceEntry(java.lang.String szMsg)
Logs a method entry trace message.

Parameters:
szMsg - the message string.

traceExit

public static void traceExit(java.lang.String szMsg)
Logs a method exit trace message.

Parameters:
szMsg - the message string.

traceFlow

public static void traceFlow(java.lang.String szMsg)
Logs a control flow trace message.

Parameters:
szMsg - the message string.

traceNormal

public static void traceNormal(java.lang.String szMsg)
Logs a normal trace message.

Parameters:
szMsg - the message string.

trace

public static void trace(int idMsg)
Logs a trace message specified by an ID. The message will be logged if any one of the filter is set.

Parameters:
idMsg - the message ID.

loadAgentProperties

public static void loadAgentProperties()
Reloads configuration parameters from the default and System properties.


loadAgentProperties

public static void loadAgentProperties(AgentProperties agProps)
See Also:
com.rsa.authagent.authapi.logger.AbstractLogger#loadAgentProperties(String)

Authentication
API v8.1 SP2

Copyright © 1999 - 2011 EMC Corporation. All Rights Reserved.