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 datatime)

        Formats a datetime and return a string to be outputted.

        Specified by:
        format in interface IFormatter
        Parameters:
        datatime - The datetime value for formatting to string
        Returns:
        String representing the log entry.