com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class LogEntry



  • public class LogEntry
    extends Object

    Represents a log message. Contains the common properties that are required for all log messages.

    • Constructor Detail

      • LogEntry

        public LogEntry()

        Initialize a new instance of a LogEntry class.

      • LogEntry

        public LogEntry(String message)

        Initialize a new instance of a LogEntry class.

        Parameters:
        message - The message.
      • LogEntry

        public LogEntry(String message,
                Date time)

        Initialize a new instance of a LogEntry class.

        Parameters:
        message - The message.
        time - The time.
      • LogEntry

        public LogEntry(String message,
                Throwable innerException)

        Initialize a new instance of a LogEntry class.

        Parameters:
        message - Message body to log. Value from ToString() method from message object.
        innerException - The inner exception to log.
      • LogEntry

        public LogEntry(String message,
                LogLevel severity)

        Initialize a new instance of a LogEntry class.

        Parameters:
        message - Message body to log. Value from ToString() method from message object.
        severity - Log entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).
      • LogEntry

        public LogEntry(String message,
                Throwable innerException,
                LogLevel severity)

        Initialize a new instance of a LogEntry class.

        Parameters:
        message - Message body to log. Value from ToString() method from message object.
        innerException - The inner exception to log.
        severity - Log entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).
      • LogEntry

        public LogEntry(String message,
                com.aspose.ms.System.Collections.Generic.IGenericDictionary properties)

        Create a new instance of LogEntry with a full set of constructor parameters

        Parameters:
        message - Message body to log. Value from ToString() method from message object.
        properties - Dictionary of key/value pairs to record.
      • LogEntry

        public LogEntry(byte[] binaryDataMessage)

        Create a new instance of LogEntry with a full set of constructor parameters

        Parameters:
        binaryDataMessage - Binary message body to log.
      • LogEntry

        public LogEntry(byte[] binaryDataMessage,
                Charset messageEncoding)

        Create a new instance of LogEntry with a full set of constructor parameters

        Parameters:
        binaryDataMessage - Binary message body to log.
        messageEncoding - Encoding for binary message
      • LogEntry

        public LogEntry(byte[] binaryDataMessage,
                com.aspose.ms.System.Collections.Generic.IGenericDictionary properties)

        Create a new instance of LogEntry with a full set of constructor parameters

        Parameters:
        binaryDataMessage - Binary message body to log.
        properties - Dictionary of key/value pairs to record.
      • LogEntry

        public LogEntry(byte[] binaryDataMessage,
                Charset messageEncoding,
                com.aspose.ms.System.Collections.Generic.IGenericDictionary properties)

        Create a new instance of LogEntry with a full set of constructor parameters

        Parameters:
        binaryDataMessage - Binary message body to log.
        messageEncoding - Encoding for binary message
        properties - Dictionary of key/value pairs to record.
      • LogEntry

        public LogEntry(String message,
                LogLevel severity,
                String category,
                int eventId,
                String title,
                com.aspose.ms.System.Collections.Generic.IGenericDictionary properties)

        Create a new instance of LogEntry with a full set of constructor parameters

        Parameters:
        message - Message body to log. Value from ToString() method from message object.
        severity - Log entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).
        category - Category name used to route the log entry to a one or more sinks.
        eventId - Event number or identifier.
        title - Additional description of the log entry message.
        properties - Dictionary of key/value pairs to record.
      • LogEntry

        public LogEntry(String message,
                Throwable innerException,
                LogLevel severity,
                String category,
                int eventId,
                String title,
                com.aspose.ms.System.Collections.Generic.IGenericDictionary properties)

        Create a new instance of LogEntry with a full set of constructor parameters

        Parameters:
        message - Message body to log. Value from ToString() method from message object.
        innerException - The inner exception to log.
        severity - Log entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).
        category - Category name used to route the log entry to a one or more sinks.
        eventId - Event number or identifier.
        title - Additional description of the log entry message.
        properties - Dictionary of key/value pairs to record.
    • Method Detail

      • getMessage

        public String getMessage()

        Message body to log. Value from ToString() method from message object.

      • setMessage

        public void setMessage(String value)

        Message body to log. Value from ToString() method from message object.

      • getBinaryDataMessage

        public byte[] getBinaryDataMessage()

        Binary message body to log.

      • setBinaryDataMessage

        public void setBinaryDataMessage(byte[] value)

        Binary message body to log.

      • getMessageEncoding

        public Charset getMessageEncoding()

        Encoding for binary message body

      • setMessageEncoding

        public void setMessageEncoding(Charset value)

        Encoding for binary message body

      • getCategory

        public String getCategory()

        Category name used to route the log entry to a one or more sinks.

      • setCategory

        public void setCategory(String value)

        Category name used to route the log entry to a one or more sinks.

      • getEventId

        public int getEventId()

        Event number or identifier.

      • setEventId

        public void setEventId(int value)

        Event number or identifier.

      • getSeverity

        public LogLevel getSeverity()

        Log entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).

      • setSeverity

        public void setSeverity(LogLevel value)

        Log entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).

      • getTitle

        public String getTitle()

        Additional description of the log entry message.

      • setTitle

        public void setTitle(String value)

        Additional description of the log entry message.

      • getTimeStamp

        public Date getTimeStamp()

        Date and time of the log entry message.

        Returns:
        a Date object.
      • setTimeStamp

        public void setTimeStamp(Date value)

        Date and time of the log entry message.

        Parameters:
        value - a Date object.
      • getMachineName

        public String getMachineName()

        Name of the computer.

      • setMachineName

        public void setMachineName(String value)

        Name of the computer.

      • getAppDomainName

        public String getAppDomainName()

        The AppDomain in which we are running

      • setAppDomainName

        public void setAppDomainName(String value)

        The AppDomain in which we are running

      • getThreadName

        public String getThreadName()

        The name of the thread.

      • setThreadName

        public void setThreadName(String value)

        The name of the thread.

      • getContextualProperties

        public com.aspose.ms.System.Collections.Generic.IGenericDictionary getContextualProperties()

        Dictionary of key/value pairs to record.

      • setContextualProperties

        public void setContextualProperties(com.aspose.ms.System.Collections.Generic.IGenericDictionary value)

        Dictionary of key/value pairs to record.

      • deepClone

        public LogEntry deepClone()

        Creates a new LogEntry that is a copy of the current instance.

        Returns:
        A new LogEntry that is a copy of the current instance.
      • addErrorMessage

        public void addErrorMessage(String message)

        Add an error or warning message to the start of the messages string builder. Used by the distributor to record problems.

        Parameters:
        message - Message to be added to this instance
      • getErrorMessages

        public String getErrorMessages()

        Gets the error message with the LogEntry

      • getSequenceId

        public int getSequenceId()

        The unique identifier of log event which is automatically generated and monotonously increasing.

      • getInnerException

        public Throwable getInnerException()

        Gets or sets the inner exception object.

      • setInnerException

        public void setInnerException(Throwable value)

        Gets or sets the inner exception object.