Questions tagged [jsnlog]

A .NET + JavaScript library that gives client-side JS the ability to log errors, warnings, etc. in server-side logs, without any server-side coding. Uses Common.Logging so it can be used with log4net, NLog, Enterprise Library, ELMAH, and others.

23 questions
4
votes
1 answer

Serilog / JSNLog .NET Core logging empty JSON

I have a .NET Core project using Serilog and JSNLog for client side logging. If I pass a JSON object from the client to the server and log it using Serilog, the logged JSON object is empty. The very weird thing is that, if I have the debugger…
Kyle
  • 236
  • 1
  • 6
  • 14
3
votes
1 answer

Using JSNLog with Angular 2

I am having trouble getting JsNlog to work with Angular 2 (latest full release). I installed JsNlog into my project (empty client web application in Visual Studio 2015) via npm and then set it up in a service but I get the error "XHR error (403…
LanceM
  • 1,888
  • 4
  • 23
  • 41
3
votes
1 answer

Incompatibility between Dotnet core, JSNLog and Serilog

I try to use JSNLog in structured mode with Serilog as explained in the documentation: http://jsnlog.com/Documentation/HowTo/StructuredLogging I have the following code in the startup.cs var jsnlogConfiguration = new JsnlogConfiguration…
hugo
  • 1,829
  • 1
  • 18
  • 47
3
votes
3 answers

What is the correct syntax for importing JSNLog using ES6?

I can't seem to figure out how to import JSNLog into my ES6 (babel) based Aurelia project. I've tried: import 'jsnlog'; // JL is undefined import JL from 'jsnlog'; // JL is {} import {JL} from 'jsnlog'; // JL is undefined If it…
David Lynch
  • 1,716
  • 15
  • 15
2
votes
0 answers

Unable to implement JSNLog on .NET 4.5 MVC application

Issue: I am trying to use JSNLog in MVC application(Target Framework: .NET 4.5). I am getting "JSN Log does not exist in the current context" error. I tried installing JSNLog 2.28.0, but it was showing: Could not install package 'JSNLog 2.28.0'.…
Indranil
  • 2,229
  • 2
  • 27
  • 40
2
votes
0 answers

Visual Studio hangs on localhost - web form - JSNLog with Elmah

I recently added jsnlog for elmah to a fairly large asp.net web form. Currently I'm testing on my localhost, and have only added logging on one page. I'm noticing that after I access that page, when I click in the Visual Studio (2015) IDE it…
AmyW
  • 313
  • 1
  • 2
  • 15
2
votes
1 answer

How to log an exception to Elmah on localhost?

I need to test implementing JSNLog in an ASP.NET web application on localhost before rolling out the changes to the live site. The web app uses Elmah for logging, which was implemented several years ago and works fine. I've included JSNLog into the…
AmyW
  • 313
  • 1
  • 2
  • 15
1
vote
0 answers

Configure JsNLog with NLog for RequestId logging under Asp.Net Core

After consulting the JsNLog docs and the 2 posts I found on SO (this and that) there were still question marks about the best solution for logging the RequestId coming from JsNLog for Javascript log entries. So far I came up with this: (1) In…
axuno
  • 581
  • 4
  • 15
1
vote
1 answer

Unable to send client side log to server (Asp.net Web API) using log4javascript

Requirement: Add client side logging and send it to server. Devs in server should be able to enable or disable this logging functionality. My Approach: I have created a ASP.NET WebAPI project, where i have created a POST method to write log data to…
Indranil
  • 2,229
  • 2
  • 27
  • 40
1
vote
1 answer

JsnLog error posting in angular 4 with elmah at server side

We are using Asp.net Web API 2 - Server side Angular 4 in client side (angular-cli) We have integrated Elmah on the server side for error handling. We have integrated Jsnlog in the client side. Our angular released version is hosted in…
Prashant Kankhara
  • 1,498
  • 4
  • 15
  • 30
1
vote
3 answers

Configure jsnlog.log4net log file path

My MVC application uses log4net for server logging and I just added jsnlog.log4net for javascript logging. I followed the official guide to configure it and it's working perfectly. And I didn't do any changes to log4net.config file. Now both…
cp100
  • 1,463
  • 6
  • 20
  • 35
1
vote
1 answer

HowTo import JSNLog module using TypeScript, SystemJS, JSPM

I fail to import the JL module from JSNLog in my TypeScript project. I installed my dependencies using JSPM: jspm install npm:jsnlog The documentation gives an example for node: var JL = require('jsnlog').JL; I tried to make it available in my…
TylerDurden
  • 697
  • 1
  • 5
  • 16
0
votes
0 answers

JSNLOg - Custom AjaxAppender does not execute if batchsize is set to one

I've been trying to build out a custom AjaxAppender with jsnlog.js and I'm noticing a strange behavior around the batch size setting. If I set the batch size to something greater than 1 it will work, otherwise it will not. There is a default…
John Babb
  • 931
  • 10
  • 19
0
votes
0 answers

Rollup Error: Unexpected token on JsnLog's ts: import JSNLogAppender = JL.JSNLogAppender

I have a reproduce repo JsnLogRollup. I would like to use JsnLog with ES6 way, take jsnlog.ES6Demo main.js as index.ts: import {JL} from 'jsnlog'; JL().info("log entry from jsnlog"); With Rollup rollup.config.mjs: import typescript from…
ChrisTorng
  • 742
  • 7
  • 18
0
votes
1 answer

Angular: "ng build -prod" produces error for jsnlog

I get the following error if I try to execute ng build --prod: ERROR in ./src/$$_gendir/app/app.module.ngfactory.ts Module not found: Error: Can't resolve 'jsnlog/Definitions/jl' in 'C:\xxx\src\$$_gendir\app' @…
Jer
  • 383
  • 3
  • 17
1
2