com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class Formatter

    • Constructor Detail

      • Formatter

        protected Formatter()

        Creates an instance of Formatter.

      • Formatter

        protected Formatter(StringBuilder logHeaderText)

        Initializes a new instance of the Formatter class.

        Parameters:
        logHeaderText - The log header text.
      • Formatter

        protected Formatter(String logHeaderText)

        Initializes a new instance of the Formatter class.

        Parameters:
        logHeaderText - The log header text.
    • Method Detail

      • getDefaultFormatter

        public static IFormatter getDefaultFormatter()

        Gets or sets default formatter

      • setDefaultFormatter

        public static void setDefaultFormatter(IFormatter value)

        Gets or sets default formatter

      • format

        public String format(LogEntry entry)

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

        Specified by:
        format in interface IFormatter
        Parameters:
        entry - Log entry to format.
        Returns:
        String representing the log entry.
      • format

        public String format(Date date)

        Formats a datetime and return a string to be outputted.

        Specified by:
        format in interface IFormatter
        Parameters:
        date - The datetime value for formatting to string
        Returns:
        a String object.
      • getHeader

        public String getHeader()

        Gets or sets the header.

        Specified by:
        getHeader in interface IFormatter
        Returns:
        A header string
      • getFooter

        public String getFooter()

        Gets or sets the footer.

        Specified by:
        getFooter in interface IFormatter
        Returns:
        A footer string
      • getLogHeader

        public String getLogHeader()

        Gets or sets the log header

        Specified by:
        getLogHeader in interface IFormatter
        Returns:
        A log header