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 final LogLevel getSeverity()

        Gets or sets severity.

      • setSeverity

        public final void setSeverity(LogLevel value)

        Gets or sets severity.

      • getName

        public final String getName()

        Gets or sets name.

      • getAppenders

        public final AppenderCollection getAppenders()

        Gets or sets the appender list.

      • setAppenders

        public final void setAppenders(AppenderCollection value)

        Gets or sets the appender list.

      • isEnabled

        public final 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 final void writeLine()

        Writes the empty line to appenders.

      • writeLine

        public final void writeLine(String message)

        Writes the specified message to appenders.

        Parameters:
        message - The message to write.
      • writeLine

        public final void writeLine(Object message)

        Writes the specified message to appenders.

        Parameters:
        message - The message to write.
      • writeFormat

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

        Writes the message with specified format to appenders.

        Parameters:
        format -
        arguments -
      • write

        public final void write(String message)

        Writes the specified message to appenders.

        Parameters:
        message - The message to write.
      • write

        public final 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 final 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 final void write(Object message)

        Writes the specified message to appenders.

        Parameters:
        message - The message to write.
      • writeIf

        public final 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 final 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 final 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 final 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 final 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 final void dispose()

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

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