Jetif v1.8.0

jetif
Interface Logger

All Known Implementing Classes:
Log4jLogger

public interface Logger

An logger is able to log runtime message to somewhere. For example, and text file. A log file allows user to monitor the testing status, debug the tests or do some thing for other purpose.
This interface is quite simple because Jetif is only a testing framework, while not a production framework. This logger interface should not be too complex.

Author:
Vicky Wang

Field Summary
static Logger DUMMY_LOGGER
          A dummy logger do nothing, and all information received by this logger are gone to a black hole.
static int ERROR
          The severity level of error message.
static int EXCEPTION
          The severity level of exception message.
static int FATAL_ERROR
          The severity level of fatal error message.
static int INFO
          The severity level of information.
static int WARNING
          The severity level of warning message.
 
Method Summary
 void close()
          Close this logger
 void log(int severity, String msg)
          Log a string message with specified severity level.
 void log(String msg)
          Log a string message with default severity level.
 void log(Throwable e)
          Log a exception.
 

Field Detail

DUMMY_LOGGER

public static final Logger DUMMY_LOGGER
A dummy logger do nothing, and all information received by this logger are gone to a black hole.


INFO

public static final int INFO
The severity level of information.

See Also:
Constant Field Values

WARNING

public static final int WARNING
The severity level of warning message.

See Also:
Constant Field Values

ERROR

public static final int ERROR
The severity level of error message.

See Also:
Constant Field Values

FATAL_ERROR

public static final int FATAL_ERROR
The severity level of fatal error message.

See Also:
Constant Field Values

EXCEPTION

public static final int EXCEPTION
The severity level of exception message.

See Also:
Constant Field Values
Method Detail

log

public void log(String msg)
Log a string message with default severity level.

Parameters:
msg - the message content.

log

public void log(int severity,
                String msg)
Log a string message with specified severity level.

Parameters:
severity - the severity level
msg - the message content.

log

public void log(Throwable e)
Log a exception.

Parameters:
e - the exception.

close

public void close()
Close this logger


Jetif v1.8.0

Copyright © 2004,2005 Vicky Wang - All Rights Reserved.