NSG.Library.Logger Namespace

NSG Library Logger

NSG.Library.Logger Namespace

A Sandcastle Documented Class Library
The NSG.Library.Logger namespace contains classes for defining an interface for logging and a simple implementation of the inferface.
Classes

  ClassDescription
Public classListLogger
A simple implementation of ILogger
Public classCode exampleLog
Make the log a singleton and globally available. Early in the application
Examples

public void Configuration(IAppBuilder app)
{
    ...
    // Globally configure logging and replace default List-Logger
    // with SQL-Logger.
    NSG.Library.Logger.Log.Logger = new WebSrv.Models.SQLLogger(
        ApplicationDbContext.Create(),
        WebSrv.Models.Constants.ApplicationLoggerName);
}
Public classLogData
The Log class.
Interfaces

  InterfaceDescription
Public interfaceILogger
Interface for Logger
Enumerations

  EnumerationDescription
Public enumerationLoggingLevel
Enum of various logging levels Note: [Range(typeof(byte), "0", "4", ErrorMessage = "'LogLevel' must be between 0 and 4")]