Formatter

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.email.IFormatter

public abstract class Formatter implements IFormatter

Represents the interface for formatting log entry messsages.

Methods

Method Description
getDefaultFormatter() Gets or sets default formatter
setDefaultFormatter(IFormatter value) Gets or sets default formatter
format(LogEntry entry) Formats a log entry and return a string to be outputted.
format(Date datatime) Formats a datetime and return a string to be outputted.
getHeader() Gets or sets the header.
getFooter() Gets or sets the footer.
getLogHeader() Gets or sets the log header

getDefaultFormatter()

public static IFormatter getDefaultFormatter()

Gets or sets default formatter

Returns: IFormatter

setDefaultFormatter(IFormatter value)

public static void setDefaultFormatter(IFormatter value)

Gets or sets default formatter

Parameters:

Parameter Type Description
value IFormatter

format(LogEntry entry)

public String format(LogEntry entry)

Formats a log entry and return a string to be outputted.

Parameters:

Parameter Type Description
entry LogEntry Log entry to format.

Returns: java.lang.String - String representing the log entry.

format(Date datatime)

public String format(Date datatime)

Formats a datetime and return a string to be outputted.

Parameters:

Parameter Type Description
datatime java.util.Date The datetime value for formatting to string

Returns: java.lang.String

getHeader()

public String getHeader()

Gets or sets the header.

Returns: java.lang.String

getFooter()

public String getFooter()

Gets or sets the footer.

Returns: java.lang.String

getLogHeader()

public String getLogHeader()

Gets or sets the log header

Returns: java.lang.String