Class LogEntryInfo
Class representing an issue that can be logged
Namespace: SuperOffice.Diagnostics
Assembly: SoCore.dll
Syntax
public sealed class LogEntryInfo : Object
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);
Constructors
LogEntryInfo()
This constructor is only to be used by the serializer!
Declaration
public LogEntryInfo()
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);
LogEntryInfo(EventLogEntryType)
Default constructor.
Declaration
public LogEntryInfo(EventLogEntryType logType)
Parameters
Type | Name | Description |
---|---|---|
EventLogEntryType | logType | The level of severity for the information to be logged. |
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);
LogEntryInfo(EventLogEntryType, SoExceptionInfo)
Class representing an issue that can be logged
Declaration
public LogEntryInfo(EventLogEntryType logType, SoExceptionInfo exception)
Parameters
Type | Name | Description |
---|---|---|
EventLogEntryType | logType | |
SoExceptionInfo | exception |
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);
LogEntryInfo(EventLogEntryType, Exception)
Default constructor.
Declaration
public LogEntryInfo(EventLogEntryType logType, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
EventLogEntryType | logType | The level of severity for the information to be logged. |
Exception | exception | Exception to be logged. |
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);
Properties
EnvironmentInfo
Name and value pair collection holding a snapshot of information that can relevant to the issue, taken at the moment immediately preceding the occurrence of the issue.
Declaration
public NameValueCollection EnvironmentInfo { get; }
Property Value
Type | Description |
---|---|
NameValueCollection |
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);
LogElement
Information about the issue
Declaration
public LogElement LogElement { get; }
Property Value
Type | Description |
---|---|
LogElement |
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);
LogEntryType
Event type.
Declaration
public EventLogEntryType LogEntryType { get; }
Property Value
Type | Description |
---|---|
EventLogEntryType |
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);
Methods
AddElement(Type, String, String)
Add information to the issue.
Declaration
public void AddElement(Type sourceType, string message, string details)
Parameters
Type | Name | Description |
---|---|---|
Type | sourceType | A Type (e.g. Exception or current class) that is relevant. |
String | message | Brief description. |
String | details | Detailed description (e.g. this could be the StackTrace of the exception or other detailed information. |
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);
ToString()
Get a string containing the entire errormessage.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | The entire error message. |
Examples
Logging an exception:
SoLogger.Logger.LogException(System.Diagnostics.EventLogEntryType.Warning, ex);