Class ThrowingLog
- Namespace
- Pixie
- Assembly
- Pixie.dll
A type of log that sends messages to another log and aborts execution if the severity of an error is deemed fatal
public sealed class ThrowingLog : ILog
- Inheritance
-
ThrowingLog
- Implements
- Inherited Members
- Extension Methods
Constructors
ThrowingLog(IEnumerable<Severity>, ILog)
Creates a test log.
public ThrowingLog(IEnumerable<Severity> fatalSeverities, ILog redirectionLog)
Parameters
fatalSeveritiesIEnumerable<Severity>A sequence of all severities that are considered fatal. A log entry whose severity is fatal triggers an exception.
redirectionLogILogA log to which messages are sent before the decision to throw an exception or not is taken.
Properties
FatalSeverities
Gets the set of all severities that are considered fatal by this log. A log entry whose severity is fatal triggers an exception.
public IEnumerable<Severity> FatalSeverities { get; }
Property Value
- IEnumerable<Severity>
A sequence of severities.
RedirectionLog
Gets the log to which messages are sent by this log before the decision to abort the program or not is taken.
public ILog RedirectionLog { get; }
Property Value
- ILog
The inner log.
Methods
Log(LogEntry)
Logs the given entry in this log.
public void Log(LogEntry entry)
Parameters
entryLogEntryThe entry to log.