Class LogEntryInfo
Class representing an issue that can be logged
Inherited Members
Namespace: SuperOffice.Diagnostics
Assembly: SoCore.dll
Syntax
public sealed class LogEntryInfo
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()
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. |
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. |
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 |
LogElement
Information about the issue
Declaration
public LogElement LogElement { get; }
Property Value
| Type | Description |
|---|---|
| LogElement |
LogEntryType
Event type.
Declaration
public EventLogEntryType LogEntryType { get; }
Property Value
| Type | Description |
|---|---|
| EventLogEntryType |
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. |
ToString()
Get a string containing the entire errormessage.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The entire error message. |