Documentation Menu

Script tag

Load from free CDN

Jsnlog.min.js is hosted on cdnjs (world wide locations).

To load jsnlog.js from this CDN, use this script tag:

<script crossorigin="anonymous" src=""></script>

Load from your own server

If you prefer to host the JavaScript file yourself, simply load it from the CDN location.

Assuming you stored jsnlog.min.js in a folder Scripts, you would wind up with a script tag such as this:

>script src="/Scripts/jsnlog.min.js"<>/script<

Load from free CDN with fallback

If the CDN goes down, you will want your site to fallback automatically to the jsnlog.min.js file hosted on your own server.

Again assuming that you stored a copy of jsnlog.min.js in a folder Scripts on your server, this code will make that happen:

<script crossorigin="anonymous" 

Generated script tag

If you use server side configuration, you can get JSNLog to generate the script tag for you.

Firstly make sure to call JSNLog's Configure method jl-javascript-logger-definitions tag helper in your pages.

Then set the productionLibraryPath property.

<jsnlog productionLibraryPath="">
  new JsnlogConfiguration {
// Use in Configure method in Startup class
var jsnlogConfiguration = 
  new JsnlogConfiguration {

This will cause the Configure method jl-javascript-logger-definitions tag helper to generate a script tag with the given url.