.Net Library Documentation

To simplify adding JustLog.IT logging into your .Net application. This library supportsany type of .NET application (web, web api, desktop application, windows service, etc.)

Getting Started

Follow these steps to get our .Net library installed and running in your application.

1. Install the .NET library
Install-Package JustLogIT.Logging.Library
Visual Studio NuGet Package Manager. Search for JustLogIT
2. Set your logging token in the app or web.config files
<appSettings>
   <add key="JustLogItToken" value="[your token]" />
</appSettings>

The following methods are all found in the JustLogIt.Nuget.Library namespace.

Methods

This is the list of methods on the logging interface you can call to store values from your running web application.

MethodParametersDescription
LogError
  • exception - the exception object to log
  • Detail - (optional) additional details for the error
  • UserIdentifier - (optional) a user marker
  • details - (optional) a key/value dictionary of additional values to append to the posted error object.
Posts an error object into JustLog.IT.
LogPerformance
  • Milliseconds - the number of milliseconds for method execution.
  • Method - the name of the method being measured.
  • UserIdentifier - (optional) a user marker
  • details - (optional) a key/value dictionary of additional values to append to the performance log.
Logs method performance into JustLog.IT.
LogEvent
  • Name - the name of the event being logged
  • UserIdentifier - (optional) a user marker
  • details - (optional) a key/value dictionary of additional values to append to the event/action log.
Logs a tracked user action.
logInformation
  • Method - the method name where the information is logged from.
  • Detail - the information being logged.
  • UserIdentifier - (optional) a user marker
  • details - (optional) a key/value dictionary of additional values to append to the information log.
Writes an information log entry into the system. These are useful to provide context to otherentries, especially errors.

How it Works

The .NET library is written to be as non-intrusive as possible for your code. When you call a logging method the libraryadds the object into a queue. There is a background thread running which processes queue items. This allows your logging actions to happen as rapidly as possible, not bogging down any other actions your application is performing.

The communication with the JustLog.IT logging endpoints (REST-ful API) uses the HttpClient object found in theSystem.Net.Http assembly.

close
Sign up to get started