Class TextLogProvider
Simple log provider that writes to a local string builder.
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.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class TextLogProvider : LogProvider
Constructors
TextLogProvider()
Initializes a new instance of the TextLogProvider.
Declaration
public TextLogProvider()
TextLogProvider(LogLevel)
Initializes a new instance of the TextLogProvider class.
Declaration
public TextLogProvider(LogLevel level)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The log level. |
Properties
Callback
Gets or sets a callback to invoke whenever text is written to the log.
Declaration
public Action1<string> Callback { get; set; }
Property Value
Type | Description |
---|---|
Action1<System.String> |
Text
Gets the logged text.
Declaration
public string Text { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Clear()
Clears all text from the log and returns the former contents.
Declaration
public string Clear()
Returns
Type | Description |
---|---|
System.String |
DoLog(LogEvent)
Logs a message at the specified log level.
Declaration
protected override void DoLog(LogEvent logEvent)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | logEvent | The log event details. |