public class StandardFormatter extends Formatter
Represents the class for formatting log entry messsages.
Constructor and Description |
---|
StandardFormatter()
Initializes a new instance of the
StandardFormatter class. |
StandardFormatter(String headerText)
Initializes a new instance of the
StandardFormatter class. |
StandardFormatter(StringBuilder headerText)
Initializes a new instance of the
StandardFormatter class. |
Modifier and Type | Method and Description |
---|---|
String |
format(LogEntry entry)
Formats a log entry and return a string to be outputted.
|
String |
getFooter()
Gest the footer string.
|
String |
getHeader()
Gets the log header.
|
format, getDefaultFormatter, getLogHeader, setDefaultFormatter
public StandardFormatter()
Initializes a new instance of the StandardFormatter
class.
public StandardFormatter(StringBuilder headerText)
Initializes a new instance of the StandardFormatter
class.
headerText
- The header text.public StandardFormatter(String headerText)
Initializes a new instance of the StandardFormatter
class.
headerText
- The header text.public String format(LogEntry entry)
Formats a log entry and return a string to be outputted.
format
in interface IFormatter
format
in class Formatter
entry
- The Log entry to format.public String getHeader()
Gets the log header.
Value:getHeader
in interface IFormatter
getHeader
in class Formatter
public String getFooter()
Gest the footer string.
getFooter
in interface IFormatter
getFooter
in class Formatter