-
Notifications
You must be signed in to change notification settings - Fork 0
NSG.Library.Logger
|
The namespace contains classes for defining an interface for logging and a simple implementation of the interface.
Structure of the logging data.
The id/key of the log record.
The date and time of the log (now).
The application passed in the constructor.
The method that called log.
The log level, can be used to limit, depending on the implementation.
The human value of the above 'LogLevel'.
The user identity of the caller.
Log message.
The exception, including the stack trace.
Create a 'to string'.
formatted string of the properties.
Enum of various logging levels Note: [Range(typeof(byte),]
if one would like to implement some sort of change auditing
For exceptions and other errors
Warning level of logs
Info level of logs
Debug level of logs
Verbose level of logs
Interface for Logger
Range of byte: "0", "4" See 'LoggingLevel' enum, must be between 0 and 4
The user identity
method calling log
the log message
the exception, including the stack trace Insert one row into Log Calling log from the web api
the id
Log(NSG.Library.Logger.LoggingLevel,System.String,System.Reflection.MethodBase,System.String,System.Exception)
Enum of 'LoggingLevel', must be between 0 and 4
The user identity
MethodBase
the log message
the exception, including the stack trace Insert one row into Log (Calling log from C#)
the id
Count of last log records to return Return a string listing.
List of string
A simple implementation of ILogger
An application name for reporting the log.
The maximum number of logs. Default is 100 and the minimum is 10. A simple implementation of ILogger using List of Log
Log(NSG.Library.Logger.LoggingLevel,System.String,System.Reflection.MethodBase,System.String,System.Exception)
Enum of 'LoggingLevel', must be between 0 and 4
The user identity
MethodBase.GetCurrentMethod()
the log message
the exception, including the stack trace Insert one row into Log (Calling log from C#)
the id
Range of byte: "0", "4" See 'LoggingLevel' enum, must be between 0 and 4
The user identity
method calling log
the log message
the exception, including the stack trace Insert one row into Log
Calling log from the web api
the id
Count of last log records to return
Return a string listing.
List of string
Make the log a singleton and globally available. Early in the application For example:
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); }
The globally-shared logger.
The Log class.
The id/key of the log record.
The date and time of the log (now).
The application passed in the constructor.
The method that called log.
The log level, can be used to limit, depending on the implementation.
Level is the human readable value of the above 'LogLevel'.
The user identity of the caller.
Log message.
The string value of the exception, including the stack trace.
Formatted string value of the class properties.
Formatted string of the properties.