LogEntry

Inheritance: java.lang.Object

public class LogEntry

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

Constructors

ConstructorDescription
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

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

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:

ParameterTypeDescription
messagejava.lang.StringThe message.

LogEntry(String message, Date time)

public LogEntry(String message, Date time)

Initialize a new instance of a LogEntry class.

Parameters:

ParameterTypeDescription
messagejava.lang.StringThe message.
timejava.util.DateThe time.

LogEntry(String message, Throwable innerException)

public LogEntry(String message, Throwable innerException)

Initialize a new instance of a LogEntry class.

Parameters:

ParameterTypeDescription
messagejava.lang.StringMessage body to log. Value from ToString() method from message object.
innerExceptionjava.lang.ThrowableThe inner exception to log.

LogEntry(String message, LogLevel severity)

public LogEntry(String message, LogLevel severity)

Initialize a new instance of a LogEntry class.

Parameters:

ParameterTypeDescription
messagejava.lang.StringMessage body to log. Value from ToString() method from message object.
severityLogLevelLog entry severity as a Severity (#getSeverity.getSeverity/#setSeverity(LogLevel).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:

ParameterTypeDescription
messagejava.lang.StringMessage body to log. Value from ToString() method from message object.
innerExceptionjava.lang.ThrowableThe inner exception to log.
severityLogLevelLog entry severity as a Severity (#getSeverity.getSeverity/#setSeverity(LogLevel).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:

ParameterTypeDescription
messagejava.lang.StringMessage body to log. Value from ToString() method from message object.
propertiescom.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:

ParameterTypeDescription
binaryDataMessagebyte[]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:

ParameterTypeDescription
binaryDataMessagebyte[]Binary message body to log.
messageEncodingjava.nio.charset.CharsetEncoding 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:

ParameterTypeDescription
binaryDataMessagebyte[]Binary message body to log.
propertiescom.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:

ParameterTypeDescription
binaryDataMessagebyte[]Binary message body to log.
messageEncodingjava.nio.charset.CharsetEncoding for binary message
propertiescom.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:

ParameterTypeDescription
messagejava.lang.StringMessage body to log. Value from ToString() method from message object.
severityLogLevelLog entry severity as a Severity (#getSeverity.getSeverity/#setSeverity(LogLevel).setSeverity(LogLevel)) enumeration. (Unspecified, Information, Warning or Error).
categoryjava.lang.StringCategory name used to route the log entry to a one or more sinks.
eventIdintEvent number or identifier.
titlejava.lang.StringAdditional description of the log entry message.
propertiescom.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:

ParameterTypeDescription
messagejava.lang.StringMessage body to log. Value from ToString() method from message object.
innerExceptionjava.lang.ThrowableThe inner exception to log.
severityLogLevelLog entry severity as a Severity (#getSeverity.getSeverity/#setSeverity(LogLevel).setSeverity(LogLevel)) enumeration. (Unspecified, Information, Warning or Error).
categoryjava.lang.StringCategory name used to route the log entry to a one or more sinks.
eventIdintEvent number or identifier.
titlejava.lang.StringAdditional description of the log entry message.
propertiescom.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,java.lang.String>Dictionary of key/value pairs to record.

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:

ParameterTypeDescription
messagejava.lang.StringMessage to be added to this instance

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.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAppDomainName()

public final String getAppDomainName()

The AppDomain in which we are running

Returns: java.lang.String

getBinaryDataMessage()

public final byte[] getBinaryDataMessage()

Binary message body to log.

Returns: byte[]

getCategory()

public final String getCategory()

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

Returns: java.lang.String

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

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>

getErrorMessages()

public final String getErrorMessages()

Gets the error message with the LogEntry

Returns: java.lang.String

getEventId()

public final int getEventId()

Event number or identifier.

Returns: int

getInnerException()

public final Throwable getInnerException()

Gets or sets the inner exception object.

Returns: java.lang.Throwable

getMachineName()

public final String getMachineName()

Name of the computer.

Returns: java.lang.String

getMessage()

public final String getMessage()

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

Returns: java.lang.String

getMessageEncoding()

public final Charset getMessageEncoding()

Encoding for binary message body

Returns: java.nio.charset.Charset

getSequenceId()

public final int getSequenceId()

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

Returns: int

getSeverity()

public final LogLevel getSeverity()

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

Returns: LogLevel

getThreadName()

public final String getThreadName()

The name of the thread.

Returns: java.lang.String

getTimeStamp()

public final Date getTimeStamp()

Date and time of the log entry message.

Returns: java.util.Date

getTitle()

public final String getTitle()

Additional description of the log entry message.

Returns: java.lang.String

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAppDomainName(String value)

public final void setAppDomainName(String value)

The AppDomain in which we are running

Parameters:

ParameterTypeDescription
valuejava.lang.String

setBinaryDataMessage(byte[] value)

public final void setBinaryDataMessage(byte[] value)

Binary message body to log.

Parameters:

ParameterTypeDescription
valuebyte[]

setCategory(String value)

public final void setCategory(String value)

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

Parameters:

ParameterTypeDescription
valuejava.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:

ParameterTypeDescription
valuecom.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,java.lang.String>

setEventId(int value)

public final void setEventId(int value)

Event number or identifier.

Parameters:

ParameterTypeDescription
valueint

setInnerException(Throwable value)

public final void setInnerException(Throwable value)

Gets or sets the inner exception object.

Parameters:

ParameterTypeDescription
valuejava.lang.Throwable

setMachineName(String value)

public final void setMachineName(String value)

Name of the computer.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setMessage(String value)

public final void setMessage(String value)

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

Parameters:

ParameterTypeDescription
valuejava.lang.String

setMessageEncoding(Charset value)

public final void setMessageEncoding(Charset value)

Encoding for binary message body

Parameters:

ParameterTypeDescription
valuejava.nio.charset.Charset

setSeverity(LogLevel value)

public final void setSeverity(LogLevel value)

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

Parameters:

ParameterTypeDescription
valueLogLevel

setThreadName(String value)

public final void setThreadName(String value)

The name of the thread.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setTimeStamp(Date value)

public final void setTimeStamp(Date value)

Date and time of the log entry message.

Parameters:

ParameterTypeDescription
valuejava.util.Date

setTitle(String value)

public final void setTitle(String value)

Additional description of the log entry message.

Parameters:

ParameterTypeDescription
valuejava.lang.String

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int