C# Class GSF.Diagnostics.LogMessage

An individual log message.
Show file Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Properties

Property Type Description
Details string
ExceptionString string
ManagedThreadID int
Message string
PreviousFirstChanceExceptionSequenceNumber int
UtcTime System.DateTime

Public Methods

Method Description
GetMessage ( ) : string

Gets the details of the message.

ToString ( ) : string

Returns a string that represents the current object.

Private Methods

Method Description
LogMessage ( LogEventPublisherDetails eventPublisherDetails, LogStackMessages initialStackMessages, LogStackTrace initialStackTrace, LogStackMessages currentStackMessages, LogStackTrace currentStackTrace, LogMessageAttributes flags, string message, string details, Exception exception ) : System

Creates a log message

LogMessage ( Stream stream, LogMessageSaveHelper saveHelper = null ) : System

Loads a log messages from the supplied stream

Save ( Stream stream, LogMessageSaveHelper saveHelper = null ) : void

Writes the log data to the stream

Method Details

GetMessage() public method

Gets the details of the message.
public GetMessage ( ) : string
return string

ToString() public method

Returns a string that represents the current object.
public ToString ( ) : string
return string

Property Details

Details public property

A long text field with the details of the message. Can be String.Empty.
public string Details
return string

ExceptionString public property

A string representation of the exception. Can be String.Empty. If loaded from the disk, since exception objects cannot be serialized, the Exception will be null and this field will have the string representation of Exception
public string ExceptionString
return string

ManagedThreadID public property

The Managed Thread ID of the thread that created this message. This is primarily to assist in future log viewing applications where it is beneficial to track the thread.
public int ManagedThreadID
return int

Message public property

A specific message about the event giving more specifics about the actual message. Typically, this will be up to 1 line of text. Can be String.Empty.
public string Message
return string

PreviousFirstChanceExceptionSequenceNumber public property

A sequence number maintained by each thread thread of the previous first chance exception that was thrown. This is used to assist LogFileViewer associate log messages with properly handled first chance exceptions.
public int PreviousFirstChanceExceptionSequenceNumber
return int

UtcTime public property

The time that the message was created.
public DateTime,System UtcTime
return System.DateTime