roast
Interface LogMessage
- All Known Implementing Classes:
- FailureMessage, UtilityMessage
- public abstract interface LogMessage
- extends java.io.Serializable
The interface for log messages.
- See Also:
LogFile
Fields inherited from class java.io.Serializable |
serialVersionUID |
Method Summary |
int |
getLevel()
Returns the log message level. |
java.lang.String |
getMessage()
Returns the log message text as a String. |
java.lang.String |
toString()
Returns a string representation of the log message. |
toString
public java.lang.String toString()
- Returns a string representation of the log message. The string
should include the log message text, message level, and any other
log message information formatted in a single line.
LogFile uses this method to print the log message for
the user.
- Returns:
- a string representation of the log message object
- Overrides:
- toString in class java.lang.Object
getMessage
public java.lang.String getMessage()
- Returns the log message text as a String.
- Returns:
- the log message text
getLevel
public int getLevel()
- Returns the log message level.
- Returns:
- the log message level