Class RecordingLog
- Namespace
- Pixie
- Assembly
- Pixie.dll
A log implementation that records all incoming entries and forwards them to another log.
public sealed class RecordingLog : ILog
- Inheritance
-
RecordingLog
- Implements
- Inherited Members
- Extension Methods
Constructors
RecordingLog()
Creates a log that simply records all incoming messages.
public RecordingLog()
RecordingLog(ILog)
Creates a log that forwards all of its incoming messages to a particular log and also records them.
public RecordingLog(ILog forwardingLog)
Parameters
forwardingLogILogThe log to forward messages to.
Properties
ForwardingLog
Gets the log to which messages are sent by this log after they have been recorded.
public ILog ForwardingLog { get; }
Property Value
- ILog
The inner log.
RecordedEntries
Gets a list of all entries that have been recorded by this log.
public IReadOnlyList<LogEntry> RecordedEntries { get; }
Property Value
- IReadOnlyList<LogEntry>
A list of all recorded entries.
Methods
Contains(Severity)
Tests if this log contains at least one entry of a particular severity.
public bool Contains(Severity severity)
Parameters
severitySeverityThe severity to look for.
Returns
- bool
trueif this log contains at least one entry ofseverity; otherwise,false.
Log(LogEntry)
Logs the given entry in this log.
public void Log(LogEntry entry)
Parameters
entryLogEntryThe entry to log.