|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--SSF.OS.OSPFv2.test.Logger
Provides some methods to write log messages and error messages. This class is used by various other classes from the SSF.OS.OSPFv2.test package.
| Field Summary | |
static byte |
DEBUG_ALL
Indicates, that both DEBUG_LOG and DEBUG_ERR are enabled. |
static byte |
DEBUG_ERR
Indicates, that errors are written to stderr. |
static byte |
DEBUG_LOG
Indicates, that messages are written to stdout. |
static byte |
DEBUG_NONE
Indicates, that messages are turned off. |
private byte |
debugging
Contains the actual ebugging mode. |
private static java.lang.String |
DEFAULT_LOG_MODE
This is the default mode for logging. |
private java.lang.String |
myName
Name of the Protocol Session, this logger belongs to. |
private SSF.OS.ProtocolSession |
mySession
Protocol Session, this logger belongs to. |
| Constructor Summary | |
Logger(byte mode,
SSF.OS.ProtocolSession sess,
java.lang.String name)
Constructor. |
|
| Method Summary | |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configures this Logger, according to the configuration passed to this method. |
void |
errMessage(java.lang.String info)
Prints an error message, if debug mode is equal to DEBUG_ERR or DEBUG_ALL. |
private double |
getSimTime()
Returns the actual simulation time in seconds. |
void |
logMessage(java.lang.String info)
Prints a log message, if debug mode is equal to DEBUG_LOG or DEBUG_ALL. |
private void |
message(java.io.PrintStream stream,
java.lang.String info)
Used by errMessage and logMessage to print the output. |
void |
setDebuggingMode(byte mode)
Sets the debugging mode. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final byte DEBUG_NONE
public static final byte DEBUG_LOG
public static final byte DEBUG_ERR
public static final byte DEBUG_ALL
private static final java.lang.String DEFAULT_LOG_MODE
private byte debugging
private SSF.OS.ProtocolSession mySession
private java.lang.String myName
| Constructor Detail |
public Logger(byte mode,
SSF.OS.ProtocolSession sess,
java.lang.String name)
mode - Specifies the debugging mode. This is one of DEBUG_NONE, DEBUG_LOG
DEBUG_ERR or DEBUG_ALL.sess - A reference to the caller's ProtocolSession.name - A name, which is displayed in every generated logfile entry.| Method Detail |
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
debug log|error|all|none
cfg - DML config containing the configuration. Typically the configuration
of the calling ProtocolSessionpublic void errMessage(java.lang.String info)
info - Contains a string with the message for the logfilepublic void logMessage(java.lang.String info)
info - Contains a string with the message for the logfilepublic void setDebuggingMode(byte mode)
mode - Debug mode
private void message(java.io.PrintStream stream,
java.lang.String info)
stream - Specifies a stream to write the message to. Typically this is
stdout for log messages and stderr for error messages.info - The message to print.private double getSimTime()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||