public class LogEntry extends Object implements com.aspose.ms.System.ICloneable
Represents a log message. Contains the common properties that are required for all log messages.
Constructor and Description |
---|
LogEntry()
Initialize a new instance of a
LogEntry class. |
LogEntry(String message)
Initialize a new instance of a
LogEntry class. |
LogEntry(String message,
com.aspose.ms.System.Exception innerException)
Initialize a new instance of a
LogEntry class. |
LogEntry(String message,
com.aspose.ms.System.Exception innerException,
LogLevel severity)
Initialize a new instance of a
LogEntry class. |
LogEntry(String message,
com.aspose.ms.System.Exception innerException,
LogLevel severity,
String category,
int eventId,
String title,
com.aspose.ms.System.Collections.IDictionary properties)
Create a new instance of
LogEntry with a full set of constructor parameters |
LogEntry(String message,
LogLevel severity)
Initialize a new instance of a
LogEntry class. |
LogEntry(String message,
LogLevel severity,
String category,
int eventId,
String title,
com.aspose.ms.System.Collections.IDictionary properties)
Create a new instance of
LogEntry with a full set of constructor parameters |
Modifier and Type | Method and Description |
---|---|
void |
addErrorMessage(String message)
Add an error or warning message to the start of the messages string builder.
|
Object |
deepClone()
Creates a new
LogEntry that is a copy of the current instance. |
String |
getAppDomainName()
The AppDomain in which we are running
|
String |
getCategory()
Category name used to route the log entry to a one or more sinks.
|
com.aspose.ms.System.Collections.IDictionary |
getContextualProperties()
Dictionary of key/value pairs to record.
|
String |
getErrorMessages()
Gets the error message with the
LogEntry |
int |
getEventId()
Event number or identifier.
|
com.aspose.ms.System.Exception |
getInnerException()
Gets or sets the inner exception object.
|
String |
getMachineName()
Name of the computer.
|
String |
getMessage()
Message body to log.
|
int |
getSequenceId()
The unique identifier of log event which is automatically generated
and monotonously increasing.
|
LogLevel |
getSeverity()
Log entry severity as a
Severity enumeration. |
String |
getThreadName()
The name of the .NET thread.
|
Date |
getTimeStamp()
Date and time of the log entry message.
|
String |
getTitle()
Additional description of the log entry message.
|
void |
setAppDomainName(String value)
The AppDomain in which we are running
|
void |
setCategory(String value)
Category name used to route the log entry to a one or more sinks.
|
void |
setContextualProperties(com.aspose.ms.System.Collections.IDictionary value)
Dictionary of key/value pairs to record.
|
void |
setEventId(int value)
Event number or identifier.
|
void |
setInnerException(com.aspose.ms.System.Exception value)
Gets or sets the inner exception object.
|
void |
setMachineName(String value)
Name of the computer.
|
void |
setMessage(String value)
Message body to log.
|
void |
setSeverity(LogLevel value)
Log entry severity as a
Severity enumeration. |
void |
setThreadName(String value)
The name of the .NET thread.
|
void |
setTimeStamp(Date value)
Date and time of the log entry message.
|
void |
setTitle(String value)
Additional description of the log entry message.
|
String |
toString() |
public LogEntry()
Initialize a new instance of a LogEntry
class.
public LogEntry(String message)
Initialize a new instance of a LogEntry
class.
message
- The message.public LogEntry(String message, com.aspose.ms.System.Exception innerException)
Initialize a new instance of a LogEntry
class.
message
- Message body to log. Value from ToString() method from message object.innerException
- The inner exception to log.public LogEntry(String message, LogLevel severity)
Initialize a new instance of a LogEntry
class.
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).public LogEntry(String message, com.aspose.ms.System.Exception innerException, LogLevel severity)
Initialize a new instance of a LogEntry
class.
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).public LogEntry(String message, LogLevel severity, String category, int eventId, String title, com.aspose.ms.System.Collections.IDictionary properties)
Create a new instance of LogEntry
with a full set of constructor 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.public LogEntry(String message, com.aspose.ms.System.Exception innerException, LogLevel severity, String category, int eventId, String title, com.aspose.ms.System.Collections.IDictionary properties)
Create a new instance of LogEntry
with a full set of constructor 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.public String getMessage()
Message body to log. Value from ToString() method from message object.
String
object.public void setMessage(String value)
Message body to log. Value from ToString() method from message object.
value
- a String
object.public String getCategory()
Category name used to route the log entry to a one or more sinks.
String
object.public void setCategory(String value)
Category name used to route the log entry to a one or more sinks.
value
- a String
object.public int getEventId()
Event number or identifier.
public void setEventId(int value)
Event number or identifier.
value
- a int.public LogLevel getSeverity()
Log entry severity as a Severity
enumeration. (Unspecified, Information, Warning or Error).
LogLevel
object.public void setSeverity(LogLevel value)
Log entry severity as a Severity
enumeration. (Unspecified, Information, Warning or Error).
value
- a LogLevel
object.public String getTitle()
Additional description of the log entry message.
String
object.public void setTitle(String value)
Additional description of the log entry message.
value
- a String
object.public Date getTimeStamp()
Date and time of the log entry message.
Date
object.public void setTimeStamp(Date value)
Date and time of the log entry message.
value
- a Date
object.public void setMachineName(String value)
Name of the computer.
value
- a String
object.public String getAppDomainName()
The AppDomain in which we are running
String
object.public void setAppDomainName(String value)
The AppDomain in which we are running
value
- a String
object.public void setThreadName(String value)
The name of the .NET thread.
value
- a String
object.public com.aspose.ms.System.Collections.IDictionary getContextualProperties()
Dictionary of key/value pairs to record.
IDictionary
object.public void setContextualProperties(com.aspose.ms.System.Collections.IDictionary value)
Dictionary of key/value pairs to record.
value
- a IDictionary
object.public Object deepClone()
Creates a new LogEntry
that is a copy of the current instance.
deepClone
in interface com.aspose.ms.System.ICloneable
LogEntry
that is a copy of the current instance.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.
message
- Message to be added to this instancepublic String getErrorMessages()
Gets the error message with the LogEntry
String
object.public int getSequenceId()
The unique identifier of log event which is automatically generated and monotonously increasing.
public com.aspose.ms.System.Exception getInnerException()
Gets or sets the inner exception object.
Exception
object.public void setInnerException(com.aspose.ms.System.Exception value)
Gets or sets the inner exception object.
value
- a Exception
object.Copyright (c) 2008-2015 Aspose Pty Ltd. All Rights Reserved.