LogMessage Class
Namespace: Stride.Core.DiagnosticsAssembly: Stride.Core.dll
A base log message used by the logging infrastructure.
public class LogMessage : ILogMessage
Remarks
This class can be derived in order to provide additional custom log information.
Name | Description | |
---|---|---|
Constructors | ||
LogMessage() | Initializes a new instance of the LogMessage class. |
|
LogMessage(String, LogMessageType, String) | Initializes a new instance of the LogMessage class. |
|
LogMessage(String, LogMessageType, String, Exception, CallerInfo) | Initializes a new instance of the LogMessage class. |
|
Properties | ||
CallerInfo | Gets or sets the caller information. |
|
Exception | Gets or sets the exception. |
|
ExceptionInfo | Gets or sets the exception info. |
|
Module | Gets or sets the module. |
|
Text | Gets or sets the text. |
|
Type | Gets or sets the type of this message. |
|
Methods | ||
ToString() | Returns a System.String that represents this instance. |
Constructors
LogMessage()
Initializes a new instance of the LogMessage class.
public LogMessage()
LogMessage(String, LogMessageType, String)
Initializes a new instance of the LogMessage class.
public LogMessage(string module, LogMessageType type, string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | module | The module. |
LogMessageType | type | The type. |
System.String | text | The text. |
LogMessage(String, LogMessageType, String, Exception, CallerInfo)
Initializes a new instance of the LogMessage class.
public LogMessage(string module, LogMessageType type, string text, Exception exception, CallerInfo callerInfo)
Parameters
Type | Name | Description |
---|---|---|
System.String | module | The module. |
LogMessageType | type | The type. |
System.String | text | The text. |
System.Exception | exception | The exception. |
CallerInfo | callerInfo | The caller info. |
Properties
CallerInfo
Gets or sets the caller information.
public CallerInfo CallerInfo { get; set; }
Property Value
Type | Description |
---|---|
CallerInfo | The caller information. |
Exception
Gets or sets the exception.
public Exception Exception { get; set; }
Property Value
Type | Description |
---|---|
System.Exception | The exception. |
ExceptionInfo
Gets or sets the exception info.
public ExceptionInfo ExceptionInfo { get; }
Property Value
Type | Description |
---|---|
ExceptionInfo |
Module
Gets or sets the module.
public string Module { get; set; }
Property Value
Type | Description |
---|---|
System.String | The module. |
Remarks
The module is an identifier for a logical part of the system. It can be a class name, a namespace or a regular string not linked to a code hierarchy.
Text
Gets or sets the text.
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | The text. |
Type
Gets or sets the type of this message.
public LogMessageType Type { get; set; }
Property Value
Type | Description |
---|---|
LogMessageType | The type. |
Methods
ToString()
Returns a System.String that represents this instance.
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |