Class LogMessage
- Namespace
- Stride.Core.Diagnostics
- Assembly
- Stride.Core.dll
A base log message used by the logging infrastructure.
public class LogMessage : ILogMessage
- Inheritance
-
LogMessage
- Implements
- Derived
- Extension Methods
Remarks
This class can be derived in order to provide additional custom log information.
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
module
stringThe module.
type
LogMessageTypeThe type.
text
stringThe 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
module
stringThe module.
type
LogMessageTypeThe type.
text
stringThe text.
exception
ExceptionThe exception.
callerInfo
CallerInfoThe caller info.
Properties
CallerInfo
Gets or sets the caller information.
public CallerInfo? CallerInfo { get; set; }
Property Value
- CallerInfo
The caller information.
Exception
Gets or sets the exception.
public Exception? Exception { get; set; }
Property Value
- Exception
The exception.
ExceptionInfo
Gets or sets the exception info.
public ExceptionInfo? ExceptionInfo { get; }
Property Value
Module
Gets or sets the module.
public string? Module { get; set; }
Property Value
- 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 virtual string Text { get; set; }
Property Value
- string
The text.
Type
Gets or sets the type of this message.
public LogMessageType Type { get; set; }
Property Value
- LogMessageType
The type.
Methods
ToString()
Returns a string that represents this instance.
public override string ToString()