Skip to main content

MicroTutorialLogger

A class in Root.Township, ATT.MicroTutorial.

Wrapper around a logger for the micro tutorial code that drops messages below a shared level (Warn by default).

Constructors​

MemberWhat it is
MicroTutorialLogger(ILogger logger)Creates a MicroTutorialLogger from logger.

Fields​

1 private and internal field
MemberWhat it is
private readonly ILogger loggerThe wrapped logger. Note that Warn messages are written to it as errors.

Properties​

MemberWhat it is
static LoggingLevel LogLevel { get; set; }Lowest level that gets logged, shared by every tutorial logger. Defaults to Warn.

Methods​

MemberWhat it is
void Debug(string message)Logs at Debug if LogLevel allows it.
void Error(string message)Logs an error if LogLevel allows it. The exception overload always logs.
void Error(Exception exception)Logs an error if LogLevel allows it. The exception overload always logs.
void Info(string message)Logs at Info if LogLevel allows it.
void Warn(string message)Logs a warning, but writes it at Error level.
1 private and internal method
MemberWhat it is
private bool IsAboveLogThreshold(LoggingLevel level)True when a message of this level should be logged under the static LogLevel.

Used in​

Members of other types that take, return or hold a MicroTutorialLogger: