Aspose::Email::Tools::Logging::LogEntry Class Reference

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

Inherits Object.

Public Member Functions

System::String get_Message ()
 Message body to log. Value from ToString() method from message object. More...
 
void set_Message (System::String value)
 Message body to log. Value from ToString() method from message object. More...
 
System::ArrayPtr< uint8_t > get_BinaryDataMessage () const
 Binary message body to log. More...
 
void set_BinaryDataMessage (System::ArrayPtr< uint8_t > value)
 Binary message body to log. More...
 
System::SharedPtr< System::Text::Encoding > get_MessageEncoding () const
 Encoding for binary message body More...
 
void set_MessageEncoding (System::SharedPtr< System::Text::Encoding > value)
 Encoding for binary message body More...
 
System::String get_Category () const
 Category name used to route the log entry to a one or more sinks. More...
 
void set_Category (System::String value)
 Category name used to route the log entry to a one or more sinks. More...
 
int32_t get_EventId () const
 Event number or identifier. More...
 
void set_EventId (int32_t value)
 Event number or identifier. More...
 
System::SharedPtr< LogLevelget_Severity () const
 Log entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error). More...
 
void set_Severity (System::SharedPtr< LogLevel > value)
 Log entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error). More...
 
System::String get_Title () const
 Additional description of the log entry message. More...
 
void set_Title (System::String value)
 Additional description of the log entry message. More...
 
System::DateTime get_TimeStamp () const
 Date and time of the log entry message. More...
 
void set_TimeStamp (System::DateTime value)
 Date and time of the log entry message. More...
 
System::String get_MachineName () const
 Name of the computer. More...
 
void set_MachineName (System::String value)
 Name of the computer. More...
 
System::String get_AppDomainName () const
 The AppDomain in which we are running More...
 
void set_AppDomainName (System::String value)
 The AppDomain in which we are running More...
 
System::String get_ThreadName () const
 The name of the .NET thread. More...
 
void set_ThreadName (System::String value)
 The name of the .NET thread. More...
 
System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String > > get_ContextualProperties () const
 Dictionary of key/value pairs to record. More...
 
void set_ContextualProperties (System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >> value)
 Dictionary of key/value pairs to record. More...
 
System::String get_ErrorMessages ()
 Gets the error message with the LogEntry More...
 
int32_t get_SequenceId () const
 The unique identifier of log event which is automatically generated and monotonously increasing. More...
 
System::Exception get_InnerException () const
 Gets the inner exception object. More...
 
void set_InnerException (System::Exception value)
 Sets the inner exception object. More...
 
 LogEntry ()
 Initialize a new instance of a LogEntry class. More...
 
 LogEntry (System::String message)
 Initialize a new instance of a LogEntry class. More...
 
 LogEntry (System::String message, System::DateTime time)
 Initialize a new instance of a LogEntry class. More...
 
 LogEntry (System::String message, System::Exception innerException)
 Initialize a new instance of a LogEntry class. More...
 
 LogEntry (System::String message, System::SharedPtr< LogLevel > severity)
 Initialize a new instance of a LogEntry class. More...
 
 LogEntry (System::String message, System::Exception innerException, System::SharedPtr< LogLevel > severity)
 Initialize a new instance of a LogEntry class. More...
 
 LogEntry (System::String message, System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >> properties)
 Create a new instance of LogEntry with a full set of constructor parameters More...
 
 LogEntry (System::ArrayPtr< uint8_t > binaryDataMessage)
 Create a new instance of LogEntry with a full set of constructor parameters More...
 
 LogEntry (System::ArrayPtr< uint8_t > binaryDataMessage, System::SharedPtr< System::Text::Encoding > messageEncoding)
 Create a new instance of LogEntry with a full set of constructor parameters More...
 
 LogEntry (System::ArrayPtr< uint8_t > binaryDataMessage, System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >> properties)
 Create a new instance of LogEntry with a full set of constructor parameters More...
 
 LogEntry (System::ArrayPtr< uint8_t > binaryDataMessage, System::SharedPtr< System::Text::Encoding > messageEncoding, System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >> properties)
 Create a new instance of LogEntry with a full set of constructor parameters More...
 
 LogEntry (System::String message, System::SharedPtr< LogLevel > severity, System::String category, int32_t eventId, System::String title, System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >> properties)
 Create a new instance of LogEntry with a full set of constructor parameters More...
 
 LogEntry (System::String message, System::Exception innerException, System::SharedPtr< LogLevel > severity, System::String category, int32_t eventId, System::String title, System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >> properties)
 Create a new instance of LogEntry with a full set of constructor parameters More...
 
System::SharedPtr< LogEntryClone ()
 Creates a new LogEntry that is a copy of the current instance. More...
 
virtual void AddErrorMessage (System::String message)
 Add an error or warning message to the start of the messages string builder. Used by the distributor to record problems. More...
 
System::String ToString () const override
 

Public Attributes

System::SharedPtr< System::Collections::Generic::Dictionary< System::SharedPtr< Formatter >, System::String > > FormatterResults
 

Friends

class Aspose::Email::Tools::Logging::ProtocolFormatter
 
class Aspose::Email::Tools::Logging::SimpleFormatter
 
class Aspose::Email::Tools::Logging::StandardFormatter
 

Detailed Description

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

Constructor & Destructor Documentation

◆ LogEntry() [1/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( )

Initialize a new instance of a LogEntry class.

◆ LogEntry() [2/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::String  message)

Initialize a new instance of a LogEntry class.

Parameters
messageThe message.

◆ LogEntry() [3/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::String  message,
System::DateTime  time 
)

Initialize a new instance of a LogEntry class.

Parameters
messageThe message.
timeThe time.

◆ LogEntry() [4/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::String  message,
System::Exception  innerException 
)

Initialize a new instance of a LogEntry class.

Parameters
messageMessage body to log. Value from ToString() method from message object.
innerExceptionThe inner exception to log.

◆ LogEntry() [5/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::String  message,
System::SharedPtr< LogLevel severity 
)

Initialize a new instance of a LogEntry class.

Parameters
messageMessage body to log. Value from ToString() method from message object.
severityLog entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).

◆ LogEntry() [6/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::String  message,
System::Exception  innerException,
System::SharedPtr< LogLevel severity 
)

Initialize a new instance of a LogEntry class.

Parameters
messageMessage body to log. Value from ToString() method from message object.
innerExceptionThe inner exception to log.
severityLog entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).

◆ LogEntry() [7/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::String  message,
System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >>  properties 
)

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

Parameters
messageMessage body to log. Value from ToString() method from message object.
propertiesDictionary of key/value pairs to record.

◆ LogEntry() [8/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::ArrayPtr< uint8_t >  binaryDataMessage)

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

Parameters
binaryDataMessageBinary message body to log.

◆ LogEntry() [9/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::ArrayPtr< uint8_t >  binaryDataMessage,
System::SharedPtr< System::Text::Encoding >  messageEncoding 
)

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

Parameters
binaryDataMessageBinary message body to log.
messageEncodingEncoding for binary message

◆ LogEntry() [10/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::ArrayPtr< uint8_t >  binaryDataMessage,
System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >>  properties 
)

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

Parameters
binaryDataMessageBinary message body to log.
propertiesDictionary of key/value pairs to record.

◆ LogEntry() [11/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::ArrayPtr< uint8_t >  binaryDataMessage,
System::SharedPtr< System::Text::Encoding >  messageEncoding,
System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >>  properties 
)

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

Parameters
binaryDataMessageBinary message body to log.
messageEncodingEncoding for binary message
propertiesDictionary of key/value pairs to record.

◆ LogEntry() [12/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::String  message,
System::SharedPtr< LogLevel severity,
System::String  category,
int32_t  eventId,
System::String  title,
System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >>  properties 
)

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

Parameters
messageMessage body to log. Value from ToString() method from message object.
severityLog entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).
categoryCategory name used to route the log entry to a one or more sinks.
eventIdEvent number or identifier.
titleAdditional description of the log entry message.
propertiesDictionary of key/value pairs to record.

◆ LogEntry() [13/13]

Aspose::Email::Tools::Logging::LogEntry::LogEntry ( System::String  message,
System::Exception  innerException,
System::SharedPtr< LogLevel severity,
System::String  category,
int32_t  eventId,
System::String  title,
System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >>  properties 
)

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

Parameters
messageMessage body to log. Value from ToString() method from message object.
innerExceptionThe inner exception to log.
severityLog entry severity as a Severity enumeration. (Unspecified, Information, Warning or Error).
categoryCategory name used to route the log entry to a one or more sinks.
eventIdEvent number or identifier.
titleAdditional description of the log entry message.
propertiesDictionary of key/value pairs to record.

Member Function Documentation

◆ AddErrorMessage()

virtual void Aspose::Email::Tools::Logging::LogEntry::AddErrorMessage ( System::String  message)
virtual

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

Parameters
messageMessage to be added to this instance

◆ Clone()

System::SharedPtr<LogEntry> Aspose::Email::Tools::Logging::LogEntry::Clone ( )

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

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

◆ get_AppDomainName()

System::String Aspose::Email::Tools::Logging::LogEntry::get_AppDomainName ( ) const

The AppDomain in which we are running

◆ get_BinaryDataMessage()

System::ArrayPtr<uint8_t> Aspose::Email::Tools::Logging::LogEntry::get_BinaryDataMessage ( ) const

Binary message body to log.

◆ get_Category()

System::String Aspose::Email::Tools::Logging::LogEntry::get_Category ( ) const

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

◆ get_ContextualProperties()

System::SharedPtr<System::Collections::Generic::IDictionary<System::String, System::String> > Aspose::Email::Tools::Logging::LogEntry::get_ContextualProperties ( ) const

Dictionary of key/value pairs to record.

◆ get_ErrorMessages()

System::String Aspose::Email::Tools::Logging::LogEntry::get_ErrorMessages ( )

Gets the error message with the LogEntry

◆ get_EventId()

int32_t Aspose::Email::Tools::Logging::LogEntry::get_EventId ( ) const

Event number or identifier.

◆ get_InnerException()

System::Exception Aspose::Email::Tools::Logging::LogEntry::get_InnerException ( ) const

Gets the inner exception object.

◆ get_MachineName()

System::String Aspose::Email::Tools::Logging::LogEntry::get_MachineName ( ) const

Name of the computer.

◆ get_Message()

System::String Aspose::Email::Tools::Logging::LogEntry::get_Message ( )

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

◆ get_MessageEncoding()

System::SharedPtr<System::Text::Encoding> Aspose::Email::Tools::Logging::LogEntry::get_MessageEncoding ( ) const

Encoding for binary message body

◆ get_SequenceId()

int32_t Aspose::Email::Tools::Logging::LogEntry::get_SequenceId ( ) const

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

◆ get_Severity()

System::SharedPtr<LogLevel> Aspose::Email::Tools::Logging::LogEntry::get_Severity ( ) const

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

◆ get_ThreadName()

System::String Aspose::Email::Tools::Logging::LogEntry::get_ThreadName ( ) const

The name of the .NET thread.

◆ get_TimeStamp()

System::DateTime Aspose::Email::Tools::Logging::LogEntry::get_TimeStamp ( ) const

Date and time of the log entry message.

◆ get_Title()

System::String Aspose::Email::Tools::Logging::LogEntry::get_Title ( ) const

Additional description of the log entry message.

◆ set_AppDomainName()

void Aspose::Email::Tools::Logging::LogEntry::set_AppDomainName ( System::String  value)

The AppDomain in which we are running

◆ set_BinaryDataMessage()

void Aspose::Email::Tools::Logging::LogEntry::set_BinaryDataMessage ( System::ArrayPtr< uint8_t >  value)

Binary message body to log.

◆ set_Category()

void Aspose::Email::Tools::Logging::LogEntry::set_Category ( System::String  value)

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

◆ set_ContextualProperties()

void Aspose::Email::Tools::Logging::LogEntry::set_ContextualProperties ( System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::String >>  value)

Dictionary of key/value pairs to record.

◆ set_EventId()

void Aspose::Email::Tools::Logging::LogEntry::set_EventId ( int32_t  value)

Event number or identifier.

◆ set_InnerException()

void Aspose::Email::Tools::Logging::LogEntry::set_InnerException ( System::Exception  value)

Sets the inner exception object.

◆ set_MachineName()

void Aspose::Email::Tools::Logging::LogEntry::set_MachineName ( System::String  value)

Name of the computer.

◆ set_Message()

void Aspose::Email::Tools::Logging::LogEntry::set_Message ( System::String  value)

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

◆ set_MessageEncoding()

void Aspose::Email::Tools::Logging::LogEntry::set_MessageEncoding ( System::SharedPtr< System::Text::Encoding >  value)

Encoding for binary message body

◆ set_Severity()

void Aspose::Email::Tools::Logging::LogEntry::set_Severity ( System::SharedPtr< LogLevel value)

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

◆ set_ThreadName()

void Aspose::Email::Tools::Logging::LogEntry::set_ThreadName ( System::String  value)

The name of the .NET thread.

◆ set_TimeStamp()

void Aspose::Email::Tools::Logging::LogEntry::set_TimeStamp ( System::DateTime  value)

Date and time of the log entry message.

◆ set_Title()

void Aspose::Email::Tools::Logging::LogEntry::set_Title ( System::String  value)

Additional description of the log entry message.

◆ ToString()

System::String Aspose::Email::Tools::Logging::LogEntry::ToString ( ) const
override

Friends And Related Function Documentation

◆ Aspose::Email::Tools::Logging::ProtocolFormatter

friend class Aspose::Email::Tools::Logging::ProtocolFormatter
friend

◆ Aspose::Email::Tools::Logging::SimpleFormatter

◆ Aspose::Email::Tools::Logging::StandardFormatter

Member Data Documentation

◆ FormatterResults

System::SharedPtr<System::Collections::Generic::Dictionary<System::SharedPtr<Formatter>, System::String> > Aspose::Email::Tools::Logging::LogEntry::FormatterResults