Table of Contents

Class Logger

Namespace
Whim
Assembly
Whim.dll
Logger used throughout Whim. It is accessed according to the singleton pattern.
public class Logger : IDisposable
Inheritance
Logger
Implements
Inherited Members

Properties

Config

The config for the logger. NOTE: Changes to this will only take effect if set prior to Initialize(IFileManager).
public LoggerConfig Config { get; set; }

Property Value

LoggerConfig

Methods

Debug(string, string, string, int)

Write a log event with the Debug level.
public static void Debug(string message, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)

Parameters

message string
The message to log.
memberName string
The caller's member name.
sourceFilePath string
The caller's source file path.
sourceLineNumber int
The caller's source line number.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Error(string, string, string, int)

Write a log event with the Error level.
public static void Error(string message, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)

Parameters

message string
The message to log.
memberName string
The caller's member name.
sourceFilePath string
The caller's source file path.
sourceLineNumber int
The caller's source line number.

Fatal(string, string, string, int)

Write a log event with the Fatal level.
public static void Fatal(string message, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)

Parameters

message string
The message to log.
memberName string
The caller's member name.
sourceFilePath string
The caller's source file path.
sourceLineNumber int
The caller's source line number.

Information(string, string, string, int)

Write a log event with the Information level.
public static void Information(string message, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)

Parameters

message string
The message to log.
memberName string
The caller's member name.
sourceFilePath string
The caller's source file path.
sourceLineNumber int
The caller's source line number.

Initialize(IFileManager)

Initializes the Logger with the file and debug sink.
public void Initialize(IFileManager fileManager)

Parameters

fileManager IFileManager

Verbose(string, string, string, int)

Write a log event with the Verbose level.
public static void Verbose(string message, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)

Parameters

message string
The message to log.
memberName string
The caller's member name.
sourceFilePath string
The caller's source file path.
sourceLineNumber int
The caller's source line number.

Warning(string, string, string, int)

Write a log event with the Warning level.
public static void Warning(string message, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)

Parameters

message string
The message to log.
memberName string
The caller's member name.
sourceFilePath string
The caller's source file path.
sourceLineNumber int
The caller's source line number.