LoggerResult Class
Namespace: Stride.Core.DiagnosticsAssembly: Stride.Core.dll
A logger that stores messages locally useful for internal log scenarios.
public class LoggerResult : Logger, ILogger, IProgressStatus
| Name | Description | |
|---|---|---|
| Constructors | ||
| LoggerResult(String) | Initializes a new instance of the LoggerResult class. |
|
| Properties | ||
| IsLoggingProgressAsInfo | Gets or sets a value indicating whether this instance is logging progress as information. Default is true. |
|
| Messages | Gets the messages logged to this instance. |
|
| Module | Gets the module name. read-write. |
|
| Methods | ||
| Clear() | Clears all messages. |
|
| CopyTo(ILogger) | Copies all messages to another instance. |
|
| LogRaw(ILogMessage) | ||
| Progress(String) | Notifies progress on this instance. |
|
| Progress(String, Int32, Int32) | Notifies progress on this instance. |
|
| ToText() | Returns a string representation of this |
|
| Events | ||
| ProgressChanged | Occurs when the progress changed for this logger. |
|
| Explicit Interface Implementations | ||
| IProgressStatus.OnProgressChanged(ProgressStatusEventArgs) | ||
Constructors
LoggerResult(String)
Initializes a new instance of the LoggerResult class.
public LoggerResult(string moduleName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | moduleName |
Properties
IsLoggingProgressAsInfo
Gets or sets a value indicating whether this instance is logging progress as information. Default is true.
public bool IsLoggingProgressAsInfo { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Messages
Gets the messages logged to this instance.
public TrackingCollection<ILogMessage> Messages { get; }
Property Value
| Type | Description |
|---|---|
| TrackingCollection<ILogMessage> | The messages. |
Module
Gets the module name. read-write.
public string Module { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The module name. |
Methods
Clear()
Clears all messages.
public virtual void Clear()
CopyTo(ILogger)
Copies all messages to another instance.
public void CopyTo(ILogger results)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogger | results | The results. |
LogRaw(ILogMessage)
protected override void LogRaw(ILogMessage logMessage)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogMessage | logMessage |
Overrides
Progress(String)
Notifies progress on this instance.
public void Progress(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | The message. |
Progress(String, Int32, Int32)
Notifies progress on this instance.
public void Progress(string message, int currentStep, int stepCount)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | The message. |
| System.Int32 | currentStep | The current step. |
| System.Int32 | stepCount | The step count. |
ToText()
Returns a string representation of this
public string ToText()
Returns
| Type | Description |
|---|---|
| System.String | System.String. |
Events
ProgressChanged
Occurs when the progress changed for this logger.
public event EventHandler<ProgressStatusEventArgs> ProgressChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<ProgressStatusEventArgs> |
Explicit Interface Implementations
IProgressStatus.OnProgressChanged(ProgressStatusEventArgs)
void IProgressStatus.OnProgressChanged(ProgressStatusEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| ProgressStatusEventArgs | e |