LogEntry

Inheritance: java.lang.Object

public class LogEntry

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

Constructors

Constructor Description
LogEntry() Initialize a new instance of a LogEntry class.
LogEntry(String message) Initialize a new instance of a LogEntry class.
LogEntry(String message, Date time) Initialize a new instance of a LogEntry class.
LogEntry(String message, Throwable innerException) Initialize a new instance of a LogEntry class.
LogEntry(String message, LogLevel severity) Initialize a new instance of a LogEntry class.
LogEntry(String message, Throwable innerException, LogLevel severity) Initialize a new instance of a LogEntry class.
LogEntry(String message, System.Collections.Generic.IGenericDictionary<String,String> properties) Create a new instance of LogEntry with a full set of constructor parameters
LogEntry(byte[] binaryDataMessage) Create a new instance of LogEntry with a full set of constructor parameters
LogEntry(byte[] binaryDataMessage, Charset messageEncoding) Create a new instance of LogEntry with a full set of constructor parameters
LogEntry(byte[] binaryDataMessage, System.Collections.Generic.IGenericDictionary<String,String> properties) Create a new instance of LogEntry with a full set of constructor parameters
LogEntry(byte[] binaryDataMessage, Charset messageEncoding, System.Collections.Generic.IGenericDictionary<String,String> properties) Create a new instance of LogEntry with a full set of constructor parameters
LogEntry(String message, LogLevel severity, String category, int eventId, String title, System.Collections.Generic.IGenericDictionary<String,String> properties) Create a new instance of LogEntry with a full set of constructor parameters
LogEntry(String message, Throwable innerException, LogLevel severity, String category, int eventId, String title, System.Collections.Generic.IGenericDictionary<String,String> properties) Create a new instance of LogEntry with a full set of constructor parameters

Methods

Method Description
getMessage() Message body to log.
setMessage(String value) Message body to log.
getBinaryDataMessage() Binary message body to log.
setBinaryDataMessage(byte[] value) Binary message body to log.
getMessageEncoding() Encoding for binary message body
setMessageEncoding(Charset value) Encoding for binary message body
getCategory() Category name used to route the log entry to a one or more sinks.
setCategory(String value) Category name used to route the log entry to a one or more sinks.
getEventId() Event number or identifier.
setEventId(int value) Event number or identifier.
getSeverity() Log entry severity as a ``` Severity ```(#getSeverity/#setSeverity(LogLevel)) enumeration.
setSeverity(LogLevel value) Log entry severity as a ``` Severity ```(#getSeverity/#setSeverity(LogLevel)) enumeration.
getTitle() Additional description of the log entry message.
setTitle(String value) Additional description of the log entry message.
getTimeStamp() Date and time of the log entry message.
setTimeStamp(Date value) Date and time of the log entry message.
getMachineName() Name of the computer.
setMachineName(String value) Name of the computer.
getAppDomainName() The AppDomain in which we are running
setAppDomainName(String value) The AppDomain in which we are running
getThreadName() The name of the thread.
setThreadName(String value) The name of the thread.
getContextualProperties() Dictionary of key/value pairs to record.
setContextualProperties(System.Collections.Generic.IGenericDictionary<String,String> value) Dictionary of key/value pairs to record.
deepClone() Creates a new LogEntry that is a copy of the current instance.
addErrorMessage(String message) Add an error or warning message to the start of the messages string builder.
getErrorMessages() Gets the error message with the LogEntry
getSequenceId() The unique identifier of log event which is automatically generated and monotonously increasing.
getInnerException() Gets or sets the inner exception object.
setInnerException(Throwable value) Gets or sets the inner exception object.
toString()

LogEntry()

public LogEntry()

Initialize a new instance of a LogEntry class.

LogEntry(String message)

public LogEntry(String message)

Initialize a new instance of a LogEntry class.

Parameters:

Parameter Type Description
message java.lang.String The message.

LogEntry(String message, Date time)

public LogEntry(String message, Date time)

Initialize a new instance of a LogEntry class.

Parameters:

Parameter Type Description
message java.lang.String The message.
time java.util.Date The time.

LogEntry(String message, Throwable innerException)

public LogEntry(String message, Throwable innerException)

Initialize a new instance of a LogEntry class.

Parameters:

Parameter Type Description
message java.lang.String Message body to log. Value from ToString() method from message object.
innerException java.lang.Throwable The inner exception to log.

LogEntry(String message, LogLevel severity)

public LogEntry(String message, LogLevel severity)

Initialize a new instance of a LogEntry class.

Parameters:

Parameter Type Description
message java.lang.String Message body to log. Value from ToString() method from message object.
severity LogLevel Log entry severity as a ``` Severity ```(#getSeverity/#setSeverity(LogLevel)) enumeration. (Unspecified, Information, Warning or Error).

LogEntry(String message, Throwable innerException, LogLevel severity)

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

Initialize a new instance of a LogEntry class.

Parameters:

Parameter Type Description
message java.lang.String Message body to log. Value from ToString() method from message object.
innerException java.lang.Throwable The inner exception to log.
severity LogLevel Log entry severity as a ``` Severity ```(#getSeverity/#setSeverity(LogLevel)) enumeration. (Unspecified, Information, Warning or Error).

LogEntry(String message, System.Collections.Generic.IGenericDictionary<String,String> properties)

public LogEntry(String message, System.Collections.Generic.IGenericDictionary<String,String> properties)

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

Parameters:

Parameter Type Description
message java.lang.String Message body to log. Value from ToString() method from message object.
properties com.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,java.lang.String> Dictionary of key/value pairs to record.

LogEntry(byte[] binaryDataMessage)

public LogEntry(byte[] binaryDataMessage)

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

Parameters:

Parameter Type Description
binaryDataMessage byte[] Binary message body to log.

LogEntry(byte[] binaryDataMessage, Charset messageEncoding)

public LogEntry(byte[] binaryDataMessage, Charset messageEncoding)

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

Parameters:

Parameter Type Description
binaryDataMessage byte[] Binary message body to log.
messageEncoding java.nio.charset.Charset Encoding for binary message

LogEntry(byte[] binaryDataMessage, System.Collections.Generic.IGenericDictionary<String,String> properties)

public LogEntry(byte[] binaryDataMessage, System.Collections.Generic.IGenericDictionary<String,String> properties)

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

Parameters:

Parameter Type Description
binaryDataMessage byte[] Binary message body to log.
properties com.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,java.lang.String> Dictionary of key/value pairs to record.

LogEntry(byte[] binaryDataMessage, Charset messageEncoding, System.Collections.Generic.IGenericDictionary<String,String> properties)

public LogEntry(byte[] binaryDataMessage, Charset messageEncoding, System.Collections.Generic.IGenericDictionary<String,String> properties)

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

Parameters:

Parameter Type Description
binaryDataMessage byte[] Binary message body to log.
messageEncoding java.nio.charset.Charset Encoding for binary message
properties com.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,java.lang.String> Dictionary of key/value pairs to record.

LogEntry(String message, LogLevel severity, String category, int eventId, String title, System.Collections.Generic.IGenericDictionary<String,String> properties)

public LogEntry(String message, LogLevel severity, String category, int eventId, String title, System.Collections.Generic.IGenericDictionary<String,String> properties)

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

Parameters:

Parameter Type Description
message java.lang.String Message body to log. Value from ToString() method from message object.
severity LogLevel Log entry severity as a ``` Severity ```(#getSeverity/#setSeverity(LogLevel)) enumeration. (Unspecified, Information, Warning or Error).
category java.lang.String Category name used to route the log entry to a one or more sinks.
eventId int Event number or identifier.
title java.lang.String Additional description of the log entry message.
properties com.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,java.lang.String> Dictionary of key/value pairs to record.

LogEntry(String message, Throwable innerException, LogLevel severity, String category, int eventId, String title, System.Collections.Generic.IGenericDictionary<String,String> properties)

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

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

Parameters:

Parameter Type Description
message java.lang.String Message body to log. Value from ToString() method from message object.
innerException java.lang.Throwable The inner exception to log.
severity LogLevel Log entry severity as a ``` Severity ```(#getSeverity/#setSeverity(LogLevel)) enumeration. (Unspecified, Information, Warning or Error).
category java.lang.String Category name used to route the log entry to a one or more sinks.
eventId int Event number or identifier.
title java.lang.String Additional description of the log entry message.
properties com.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,java.lang.String> Dictionary of key/value pairs to record.

getMessage()

public final String getMessage()

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

Returns: java.lang.String

setMessage(String value)

public final void setMessage(String value)

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

Parameters:

Parameter Type Description
value java.lang.String

getBinaryDataMessage()

public final byte[] getBinaryDataMessage()

Binary message body to log.

Returns: byte[]

setBinaryDataMessage(byte[] value)

public final void setBinaryDataMessage(byte[] value)

Binary message body to log.

Parameters:

Parameter Type Description
value byte[]

getMessageEncoding()

public final Charset getMessageEncoding()

Encoding for binary message body

Returns: java.nio.charset.Charset

setMessageEncoding(Charset value)

public final void setMessageEncoding(Charset value)

Encoding for binary message body

Parameters:

Parameter Type Description
value java.nio.charset.Charset

getCategory()

public final String getCategory()

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

Returns: java.lang.String

setCategory(String value)

public final void setCategory(String value)

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

Parameters:

Parameter Type Description
value java.lang.String

getEventId()

public final int getEventId()

Event number or identifier.

Returns: int

setEventId(int value)

public final void setEventId(int value)

Event number or identifier.

Parameters:

Parameter Type Description
value int

getSeverity()

public final LogLevel getSeverity()

Log entry severity as a ``` Severity ```(#getSeverity/#setSeverity(LogLevel)) enumeration. (Unspecified, Information, Warning or Error).

Returns: LogLevel

setSeverity(LogLevel value)

public final void setSeverity(LogLevel value)

Log entry severity as a ``` Severity ```(#getSeverity/#setSeverity(LogLevel)) enumeration. (Unspecified, Information, Warning or Error).

Parameters:

Parameter Type Description
value LogLevel

getTitle()

public final String getTitle()

Additional description of the log entry message.

Returns: java.lang.String

setTitle(String value)

public final void setTitle(String value)

Additional description of the log entry message.

Parameters:

Parameter Type Description
value java.lang.String

getTimeStamp()

public final Date getTimeStamp()

Date and time of the log entry message.

Returns: java.util.Date

setTimeStamp(Date value)

public final void setTimeStamp(Date value)

Date and time of the log entry message.

Parameters:

Parameter Type Description
value java.util.Date

getMachineName()

public final String getMachineName()

Name of the computer.

Returns: java.lang.String

setMachineName(String value)

public final void setMachineName(String value)

Name of the computer.

Parameters:

Parameter Type Description
value java.lang.String

getAppDomainName()

public final String getAppDomainName()

The AppDomain in which we are running

Returns: java.lang.String

setAppDomainName(String value)

public final void setAppDomainName(String value)

The AppDomain in which we are running

Parameters:

Parameter Type Description
value java.lang.String

getThreadName()

public final String getThreadName()

The name of the thread.

Returns: java.lang.String

setThreadName(String value)

public final void setThreadName(String value)

The name of the thread.

Parameters:

Parameter Type Description
value java.lang.String

getContextualProperties()

public final System.Collections.Generic.IGenericDictionary<String,String> getContextualProperties()

Dictionary of key/value pairs to record.

Returns: com.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,java.lang.String>

setContextualProperties(System.Collections.Generic.IGenericDictionary<String,String> value)

public final void setContextualProperties(System.Collections.Generic.IGenericDictionary<String,String> value)

Dictionary of key/value pairs to record.

Parameters:

Parameter Type Description
value com.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,java.lang.String>

deepClone()

public final LogEntry deepClone()

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

Returns: LogEntry - A new ``` LogEntry ``` that is a copy of the current instance.

addErrorMessage(String message)

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:

Parameter Type Description
message java.lang.String Message to be added to this instance

getErrorMessages()

public final String getErrorMessages()

Gets the error message with the LogEntry

Returns: java.lang.String

getSequenceId()

public final int getSequenceId()

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

Returns: int

getInnerException()

public final Throwable getInnerException()

Gets or sets the inner exception object.

Returns: java.lang.Throwable

setInnerException(Throwable value)

public final void setInnerException(Throwable value)

Gets or sets the inner exception object.

Parameters:

Parameter Type Description
value java.lang.Throwable

toString()

public String toString()

Returns: java.lang.String