Class StringWriterLogger
This logger will just append the content to a StringWriter Use the Output property to get the "log" (result)
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:Dapplo.Log.Loggers
Assembly:Dapplo.Log.Loggers.dll
Syntax
public class StringWriterLogger : AbstractLogger, ILogger, ILoggerConfiguration, IDisposable
Properties
| Improve this Doc View SourceOutput
Use this to collect the current string content
Declaration
public string Output { get; }
Property Value
Type | Description |
---|---|
System.String | string |
Methods
| Improve this Doc View SourceClear()
Use this to clear the content
Declaration
public void Clear()
Dispose()
Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()
|
Improve this Doc
View Source
Write(LogInfo, String, Object[])
Write a message with parameters to the logger
Declaration
public override void Write(LogInfo logInfo, string messageTemplate, params object[] logParameters)
Parameters
Type | Name | Description |
---|---|---|
LogInfo | logInfo | LogInfo |
System.String | messageTemplate | string with the message template |
System.Object[] | logParameters | object array with the parameters for the template |