Sphyrnidae Common Library
2.0.1
Shared Utilities/Library
|
Logging implementation that does absolutely nothing More...
Public Member Functions | |
void | Generic (BaseLogInformation info, Action errorAction=null) |
void | Entry (TimerBaseInformation info, Action errorAction=null) |
void | Exit (TimerBaseInformation info, Action errorAction=null) |
void | Log (TraceEventType severity, string message, string category="") |
Logs a generic message More... | |
void | Unauthorized (string message) |
Logs an unauthorized access to the system More... | |
TimerInformation | TimerStart (string name) |
Will log how long the enclosed action took (from TimerStart to TimerEnd) More... | |
void | TimerEnd (TimerInformation info) |
Logs the actual time an operation lasted (in milliseconds) More... | |
void | Custom1< T > (T obj, string message="") |
Logs a generic object More... | |
void | Custom2< T > (T obj, string message="") |
Logs a generic object More... | |
void | Custom3< T > (T obj, string message="") |
Logs a generic object More... | |
CustomTimerInformation1< T1, T2 > | CustomTimer1Start< T1, T2 > (T1 obj, string message="") |
Will log a custom timer object More... | |
CustomTimerInformation2< T1, T2 > | CustomTimer2Start< T1, T2 > (T1 obj, string message="") |
Will log a custom timer object More... | |
CustomTimerInformation3< T1, T2 > | CustomTimer3Start< T1, T2 > (T1 obj, string message="") |
Will log a custom timer object More... | |
void | CustomTimerEnd< T1, T2 > (CustomTimerInformation< T1, T2 > info, T2 obj) |
Logs the actual time a custom timer took (in milliseconds) More... | |
AttributeInformation | AttributeEntry (string attributeName, Dictionary< string, string > parameters) |
Will log an Attribute call More... | |
void | AttributeExit (AttributeInformation info) |
Logs the actual time the attribute took (in milliseconds), as well as the result More... | |
Task< ApiInformation > | ApiEntry () |
Will log all configurable information about an API call More... | |
void | ApiExit (ApiInformation info, int statusCode, string result) |
Logs the actual time API took (in milliseconds), as well as the result More... | |
Task | ApiExit (ApiInformation info, HttpResponse response) |
Logs the actual time API took (in milliseconds), as well as the result More... | |
DatabaseInformation | DatabaseEntry (string cnnName, string command, object args=null) |
Will log all configurable information about a database call More... | |
void | DatabaseExit (DatabaseInformation info) |
Logs the actual time the database call took (in milliseconds) More... | |
WebServiceInformation | WebServiceEntry (HttpHeaders headers, string name, string url, string method, object data=null) |
Will log all configurable information about a web service call More... | |
void | WebServiceExit (WebServiceInformation info, int statusCode, string result) |
Logs the actual time the web service call took (in milliseconds), and optionally the result More... | |
Task | WebServiceExit (WebServiceInformation info, HttpResponseMessage response) |
Logs the actual time the web service call took (in milliseconds), and optionally the result More... | |
MiddlewareInformation | MiddlewareEntry (string name) |
Will log information about a middleware component More... | |
void | MiddlewareExit (MiddlewareInformation info) |
Logs the actual time the middleware took (in milliseconds) More... | |
void | HiddenException (Exception ex, bool messageOnly) |
Will log all hidden exception information More... | |
void | HiddenException (Exception ex, string title="", bool messageOnly=true) |
Will log all hidden exception information More... | |
Guid | Exception (Exception e, bool messageOnly) |
Will log all exception information More... | |
Guid | Exception (Exception e, string title="", bool messageOnly=false) |
Will log all exception information More... | |
Logging implementation that does absolutely nothing
Task<ApiInformation> Sphyrnidae.Common.Logging.NonLogger.ApiEntry | ( | ) |
Will log all configurable information about an API call
Call this method when first entering an API method The actual information that is collected (or if this even logs out) will be given by your implementation of ILoggerConfiguration/ApiInformation
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
Task Sphyrnidae.Common.Logging.NonLogger.ApiExit | ( | ApiInformation | info, |
HttpResponse | response | ||
) |
Logs the actual time API took (in milliseconds), as well as the result
This should be called after ApiEntry
info | The object with the api information which was returned from ApiEntry |
response | The HttpResponse object |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.ApiExit | ( | ApiInformation | info, |
int | statusCode, | ||
string | result | ||
) |
Logs the actual time API took (in milliseconds), as well as the result
This should be called after ApiEntry
info | The object with the api information which was returned from ApiEntry |
statusCode | The http status code of the result |
result | The full http result |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
AttributeInformation Sphyrnidae.Common.Logging.NonLogger.AttributeEntry | ( | string | attributeName, |
Dictionary< string, string > | parameters | ||
) |
Will log an Attribute call
Call this method when first entering an attribute
attributeName | The name of the attribute |
parameters | The parameters into the attribute |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.AttributeExit | ( | AttributeInformation | info | ) |
Logs the actual time the attribute took (in milliseconds), as well as the result
This should be called after AttributeEntry
info | The object with the attribute information which was returned from AttributeEntry |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.Custom1< T > | ( | T | obj, |
string | message = "" |
||
) |
Logs a generic object
To use this, you should create a class inheriting from CustomInformation1. Fill out all of the required abstract methods (and override any others) You will need to register this service: Eg. services.TryAddTransient<CustomInformation1<Widget>, WidgetInformation>(); When you call this method, the type needs to match... otherwise runtime exception with service locator.
obj | Your object to be logged |
message | Optional message to be logged (if not supplied in your inherited class) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.Custom2< T > | ( | T | obj, |
string | message = "" |
||
) |
Logs a generic object
To use this, you should create a class inheriting from CustomInformation2. Fill out all of the required abstract methods (and override any others) You will need to register this service: Eg. services.TryAddTransient<CustomInformation2<Widget>, WidgetInformation>(); When you call this method, the type needs to match... otherwise runtime exception with service locator.
obj | Your object to be logged |
message | Optional message to be logged (if not supplied in your inherited class) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.Custom3< T > | ( | T | obj, |
string | message = "" |
||
) |
Logs a generic object
To use this, you should create a class inheriting from CustomInformation3. Fill out all of the required abstract methods (and override any others) You will need to register this service: Eg. services.TryAddTransient<CustomInformation3<Widget>, WidgetInformation>(); When you call this method, the type needs to match... otherwise runtime exception with service locator.
obj | Your object to be logged |
message | Optional message to be logged (if not supplied in your inherited class) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
CustomTimerInformation1<T1, T2> Sphyrnidae.Common.Logging.NonLogger.CustomTimer1Start< T1, T2 > | ( | T1 | obj, |
string | message = "" |
||
) |
Will log a custom timer object
To use this, you should create a class inheriting from CustomTimerInformation1. Fill out all of the required abstract methods (and override any others) You will need to register this service: Eg. services.TryAddTransient<CustomTimerInformation1<Widget, Foo>, WidgetTimerInformation>(); When you call this method, the type needs to match... otherwise runtime exception with service locator.
obj | Your object to be logged |
message | Optional message to be logged (if not supplied in your inherited class) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
CustomTimerInformation2<T1, T2> Sphyrnidae.Common.Logging.NonLogger.CustomTimer2Start< T1, T2 > | ( | T1 | obj, |
string | message = "" |
||
) |
Will log a custom timer object
To use this, you should create a class inheriting from CustomTimerInformation2. Fill out all of the required abstract methods (and override any others) You will need to register this service: Eg. services.TryAddTransient<CustomTimerInformation2<Widget, Foo>, WidgetTimerInformation>(); When you call this method, the type needs to match... otherwise runtime exception with service locator.
obj | Your object to be logged |
message | Optional message to be logged (if not supplied in your inherited class) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
CustomTimerInformation3<T1, T2> Sphyrnidae.Common.Logging.NonLogger.CustomTimer3Start< T1, T2 > | ( | T1 | obj, |
string | message = "" |
||
) |
Will log a custom timer object
To use this, you should create a class inheriting from CustomTimerInformation3. Fill out all of the required abstract methods (and override any others) You will need to register this service: Eg. services.TryAddTransient<CustomTimerInformation3<Widget, Foo>, WidgetTimerInformation>(); When you call this method, the type needs to match... otherwise runtime exception with service locator.
obj | Your object to be logged |
message | Optional message to be logged (if not supplied in your inherited class) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.CustomTimerEnd< T1, T2 > | ( | CustomTimerInformation< T1, T2 > | info, |
T2 | obj | ||
) |
Logs the actual time a custom timer took (in milliseconds)
This should be called after CustomTimerStart
info | The object with the timer which was returned from CustomTimerStart |
obj | Any object to store additional user-supplied information |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
DatabaseInformation Sphyrnidae.Common.Logging.NonLogger.DatabaseEntry | ( | string | cnnName, |
string | command, | ||
object | args = null |
||
) |
Will log all configurable information about a database call
Call this method right before making a call to a database The actual information that is collected (or if this even logs out) will be given by your implementation of ILoggerConfiguration/DatabaseInformation
cnnName | The "nice" name for which database/connection you are using (don't include sensitive information) |
command | The command being executed |
args | Any parameters for the command |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.DatabaseExit | ( | DatabaseInformation | info | ) |
Logs the actual time the database call took (in milliseconds)
This should be called after DatabaseEntry
info | The object with the database information which was returned from DatabaseEntry |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.Entry | ( | TimerBaseInformation | info, |
Action | errorAction = null |
||
) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
Guid Sphyrnidae.Common.Logging.NonLogger.Exception | ( | Exception | e, |
bool | messageOnly | ||
) |
Will log all exception information
Call this method whenever an exception has occurred that has stopped processing of the request The actual information that is collected (or if this even logs out) will be given by your implementation of ILoggerConfiguration/ExceptionInformation
e | The exception that was thrown |
messageOnly | Optional. Default = true If true, this will only log the exception text and type If false, all relevant information will be logged (eg. Stack Trace) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
Guid Sphyrnidae.Common.Logging.NonLogger.Exception | ( | Exception | e, |
string | title = "" , |
||
bool | messageOnly = false |
||
) |
Will log all exception information
Call this method whenever an exception has occurred that has stopped processing of the request The actual information that is collected (or if this even logs out) will be given by your implementation of ILoggerConfiguration/ExceptionInformation
e | The exception that was thrown |
title | The type of exception, or a "nice" name you are giving this |
messageOnly | Optional. Default = true If true, this will only log the exception text and type If false, all relevant information will be logged (eg. Stack Trace) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.Exit | ( | TimerBaseInformation | info, |
Action | errorAction = null |
||
) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.Generic | ( | BaseLogInformation | info, |
Action | errorAction = null |
||
) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.HiddenException | ( | Exception | ex, |
bool | messageOnly | ||
) |
Will log all hidden exception information
Call this method whenever an exception has occurred that will be ignored The actual information that is collected (or if this even logs out) will be given by your implementation of ILoggerConfiguration/ExceptionInformation
ex | The exception that is being hidden |
messageOnly | Optional. Default = true If true, this will only log the exception text and type If false, all relevant information will be logged (eg. Stack Trace) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.HiddenException | ( | Exception | ex, |
string | title = "" , |
||
bool | messageOnly = true |
||
) |
Will log all hidden exception information
Call this method whenever an exception has occurred that will be ignored The actual information that is collected (or if this even logs out) will be given by your implementation of ILoggerConfiguration/ExceptionInformation
ex | The exception that is being hidden |
title | The type of exception, or a "nice" name you are giving this |
messageOnly | Optional. Default = true If true, this will only log the exception text and type If false, all relevant information will be logged (eg. Stack Trace) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.Log | ( | TraceEventType | severity, |
string | message, | ||
string | category = "" |
||
) |
Logs a generic message
Call this function at any place in your code where you want to capture helpful information
severity | The severity level of the log request |
message | The message to log |
category | The category of the message Default: "" (nothing) |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
MiddlewareInformation Sphyrnidae.Common.Logging.NonLogger.MiddlewareEntry | ( | string | name | ) |
Will log information about a middleware component
name | The name of the middleware component |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.MiddlewareExit | ( | MiddlewareInformation | info | ) |
Logs the actual time the middleware took (in milliseconds)
info | The object with the middleware information which was returned from MiddlewareEntry |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.TimerEnd | ( | TimerInformation | info | ) |
Logs the actual time an operation lasted (in milliseconds)
This should be called after TimerStart
info | The object with the timer which was returned from TimerStart |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
TimerInformation Sphyrnidae.Common.Logging.NonLogger.TimerStart | ( | string | name | ) |
Will log how long the enclosed action took (from TimerStart to TimerEnd)
Call this function at any place in your code where you want to capture helpful timing information
name | The name you are giving this timer |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.Unauthorized | ( | string | message | ) |
Logs an unauthorized access to the system
This should be called on your authentication/authorization checks if they fail
message | The message to log |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
WebServiceInformation Sphyrnidae.Common.Logging.NonLogger.WebServiceEntry | ( | HttpHeaders | headers, |
string | name, | ||
string | url, | ||
string | method, | ||
object | data = null |
||
) |
Will log all configurable information about a web service call
Call this method right before making a web service call The actual information that is collected (or if this even logs out) will be given by your implementation of ILoggerConfiguration/WebServiceInformation
headers | The collection of HTTP headers that will have logger prefix added |
name | The unique name of the route you are hitting |
url | The endpoint that is being hit |
method | The HTTP method: GET POST PUT DELETE OTHER |
data | Any additional data being sent in the body of the request |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
Task Sphyrnidae.Common.Logging.NonLogger.WebServiceExit | ( | WebServiceInformation | info, |
HttpResponseMessage | response | ||
) |
Logs the actual time the web service call took (in milliseconds), and optionally the result
This should be called after WebServiceEntry
info | The object with the web service information which was returned from WebServiceEntry |
response | The result from the web service call |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.
void Sphyrnidae.Common.Logging.NonLogger.WebServiceExit | ( | WebServiceInformation | info, |
int | statusCode, | ||
string | result | ||
) |
Logs the actual time the web service call took (in milliseconds), and optionally the result
This should be called after WebServiceEntry
info | The object with the web service information which was returned from WebServiceEntry |
statusCode | The http status code of the result |
result | The full http result |
Implements Sphyrnidae.Common.Logging.Interfaces.ILogger.