com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class Logger

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable


    public final class Logger
    extends Object
    implements com.aspose.ms.System.IDisposable

    Provides the logging functionality.

    • Method Detail

      • getDebug

        public static Logger getDebug()

        Gets the debug logger.

      • getSeverity

        public LogLevel getSeverity()

        Gets or sets severity.

      • setSeverity

        public void setSeverity(LogLevel value)

        Gets or sets severity.

      • getName

        public String getName()

        Gets or sets name.

      • setAppenders

        public void setAppenders(AppenderCollection value)

        Gets or sets the appender list.

      • isEnabled

        public boolean isEnabled(LogLevel level)

        Determines if logging is enabled for the specified level.

        Parameters:
        level - level to be checked
        Returns:
        if logging is enabled for the specified level, otherwise it returns .
      • writeLine

        public void writeLine()

        Writes the empty line to appenders.

      • writeLine

        public void writeLine(String message)

        Writes the specified message to appenders.

        Parameters:
        message - The message to write.
      • writeLine

        public void writeLine(Object message)

        Writes the specified message to appenders.

        Parameters:
        message - The message to write.
      • writeFormat

        public void writeFormat(String format,
                       Object... arguments)

        Writes the message with specified format to appenders.

        Parameters:
        format -
        arguments -
      • write

        public void write(String message)

        Writes the specified message to appenders.

        Parameters:
        message - The message to write.
      • write

        public void write(String message,
                 Exception exception)

        Writes the specified message and exception to appenders.

        Parameters:
        message - The message to write.
        exception - The exception to write.
      • write

        public void write(String message,
                 Exception ex,
                 LogLevel level)

        Writes the specified message and exception to appenders.

        Parameters:
        message - The message to write.
        ex - The exception to write.
        level - The log level.
      • write

        public void write(Object message)

        Writes the specified message to appenders.

        Parameters:
        message - The message to write.
      • writeIf

        public void writeIf(boolean condition,
                   String message)

        Writes the specified message to appenders if condition is true.

        Parameters:
        condition - The condition to test.
        message - The message to write.
      • writeIf

        public void writeIf(boolean condition,
                   Object message)

        Writes the specified message to appenders if condition is true.

        Parameters:
        condition - The condition to test.
        message - The message to write.
      • writeIf

        public void writeIf(boolean condition,
                   Object message,
                   Exception exception)

        Writes the specified message and exception to appenders if condition is true.

        Parameters:
        condition - The condition to test.
        message - The message to write.
        exception - The exception to write.
      • writeIf

        public void writeIf(LogLevel condition,
                   String message)

        Writes the specified message if the log level is enabled.

        Parameters:
        condition - The log level.
        message - The message to log.
      • writeIf

        public void writeIf(LogLevel condition,
                   String message,
                   Exception exception)

        Writes the specified message and exception if the log level is enabled.

        Parameters:
        condition - The log level.
        message - The message to log.
        exception - The exception to log.
      • dispose

        public void dispose()

        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable