Class LoggerResult
- Namespace
- Stride.Core.Diagnostics
- Assembly
- Stride.Core.dll
A logger that stores messages locally useful for internal log scenarios.
public class LoggerResult : Logger, ILogger, IProgressStatus
- Inheritance
-
LoggerResult
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
LoggerResult(string)
Initializes a new instance of the LoggerResult class.
public LoggerResult(string moduleName = null)
Parameters
moduleName
string
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
- bool
true
if this instance is logging progress as information; otherwise,false
.
Messages
Gets the messages logged to this instance.
public TrackingCollection<ILogMessage> Messages { get; }
Property Value
- TrackingCollection<ILogMessage>
The messages.
Module
Gets the module name. read-write.
public string Module { get; set; }
Property Value
- 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
results
ILoggerThe results.
LogRaw(ILogMessage)
Internal method used to log a message. All Info, Debug, Error...etc. methods are calling this method.
protected override void LogRaw(ILogMessage logMessage)
Parameters
logMessage
ILogMessageThe log message.
Progress(string)
Notifies progress on this instance.
public void Progress(string message)
Parameters
message
stringThe message.
Progress(string, int, int)
Notifies progress on this instance.
public void Progress(string message, int currentStep, int stepCount)
Parameters
ToText()
Returns a string representation of this
public string ToText()
Returns
- string
System.String.
Events
ProgressChanged
Occurs when the progress changed for this logger.
public event EventHandler<ProgressStatusEventArgs> ProgressChanged