Skip to end of metadata
Go to start of metadata

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

Definition

public class LogEntry : ICloneable, INotifyPropertyChanged

Summary

The following table summarizes the members exposed in this class.

Public Constructors

LogEntry Constructor() Initialize a new instance of a LogEntry class.
LogEntry Constructor(object, string, int, int, SeverityType, string, IDictionary<string, object>) Create a new instance of LogEntry with a full set of constructor parameters
LogEntry Constructor(object, ICollection<string>, int, int, SeverityType, string, IDictionary<string, object>) Create a new instance of LogEntry with a full set of constructor parameters

Public Properties

ActivityId Tracing activity id
Categories Category name used to route the log entry to a one or more trace listeners.
CategoriesString Gets the categories in csv string.
ErrorMessages Gets the error message with the LogEntry
EventId Event number or identifier.
ExtendedProperties Dictionary of key/value pairs to record.
Id Gets or sets the log identifier.
LocalTimeStamp
LoggedSeverity Gets the string representation of the <ac:link ac:anchor="P:Intersoft.Crosslight.Logging.LogEntry.Severity"> <ri:page ri:content-title="LogEntry Class"/> <ac:plain-text-link-body><![CDATA[LogEntry]]></ac:plain-text-link-body> </ac:link> enumeration.
ManagedThreadName The name of the .NET thread.
Message Message body to log. Value from ToString() method from message object.
Priority Importance of the log message. Only messages whose priority is between the minimum and maximum priorities (inclusive) will be processed.
RelatedActivityId Related activity id
Severity Log entry severity as a LogEntry enumeration. (Unspecified, Information, Warning or Error).
TimeStamp Date and time of the log entry message.
Title Additional description of the log entry message.

Public Methods

AddErrorMessage(string) Add an error or warning message to the start of the messages string builder.
Clone() Creates a new LogEntry that is a copy of the current instance.
ToString() Returns a System.String that represents the current LogEntry, using a default formatting template.

Events

PropertyChanged Occurs when a property value changes.

Public Constructors

public LogEntry()

Initialize a new instance of a LogEntry class.

public LogEntry(object message, string category, int priority, int eventId, SeverityType severity, string title, IDictionary<string, object> properties)

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

Parameters

message Message body to log. Value from ToString() method from message object.
category Category name used to route the log entry to a one or more trace listeners.
priority Only messages must be above the minimum priority are processed.
eventId Event number or identifier.
severity Log entry severity as a LogEntry enumeration. (Unspecified, Information, Warning or Error).
title Additional description of the log entry message.
properties Dictionary of key/value pairs to record.

public LogEntry(object message, ICollection<string> categories, int priority, int eventId, SeverityType severity, string title, IDictionary<string, object> properties)

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

Parameters

message Message body to log. Value from ToString() method from message object.
categories Collection of category names used to route the log entry to a one or more sinks.
priority Only messages must be above the minimum priority are processed.
eventId Event number or identifier.
severity Log entry severity as a LogEntry enumeration. (Unspecified, Information, Warning or Error).
title Additional description of the log entry message.
properties Dictionary of key/value pairs to record.

Public Properties

public Guid ActivityId { get; set; }

Tracing activity id

public ICollection<string> Categories { get; set; }

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

public string CategoriesString { get; }

Gets the categories in csv string.

public string ErrorMessages { get; }

Gets the error message with the LogEntry

public int EventId { get; set; }

Event number or identifier.

public IDictionary<string, object> ExtendedProperties { get; set; }

Dictionary of key/value pairs to record.

public Guid Id { get; set; }

Gets or sets the log identifier.

public DateTime LocalTimeStamp { get; }

public string LoggedSeverity { get; }

Gets the string representation of the <ac:link ac:anchor="P:Intersoft.Crosslight.Logging.LogEntry.Severity"> <ri:page ri:content-title="LogEntry Class"/> <ac:plain-text-link-body><![CDATA[LogEntry]]></ac:plain-text-link-body> </ac:link> enumeration.

public string ManagedThreadName { get; set; }

The name of the .NET thread.

public string Message { get; set; }

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

public int Priority { get; set; }

Importance of the log message. Only messages whose priority is between the minimum and maximum priorities (inclusive) will be processed.

public Nullable<Guid> RelatedActivityId { get; set; }

Related activity id

public SeverityType Severity { get; set; }

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

public DateTime TimeStamp { get; set; }

Date and time of the log entry message.

public string Title { get; set; }

Additional description of the log entry message.

Public Methods

public void AddErrorMessage(string message)

Add an error or warning message to the start of the messages string builder.

Parameters

message Message to be added to this instance

public object Clone()

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

Return Types

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

public string ToString()

Returns a System.String that represents the current LogEntry, using a default formatting template.

Return Types

A System.String that represents the current LogEntry.

Events

public event PropertyChangedEventHandler PropertyChanged

Occurs when a property value changes.

  • No labels