mperdeck/jsnlog.js

Is there a way to have <script src='jsnlog.min.js' /> before the initialization script

kinau opened this issue · 1 comments

kinau commented

I use jsnlog in one of my ASP.NET MVC5 projects. I use the @Html.Raw(JSNLog.JavascriptionLogging.Configure()) at the top of my layout page. It keeps errorring during page load complaining about:

0x800a1391 - JavaScript runtime error: 'JL' is undefined

Script on HTML

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

If I include the jsnlog.min.js at the top like below, it works but jsnlog.min.js will be loaded twice. Please advice. Thanks.

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

@Html.Raw(JSNLog.JavascriptLogging.Configure())

From your description, I can only assume that your pages run JavaScript code that tries to log something before you call @Html.Raw(JSNLog.JavascriptionLogging.Configure())

Your bug report doesn't have enough information to reproduce the problem. If the problem persists, could you please create a small test application that reproduces the problem and let me know where to find it on Github. I can then reproduce the issue at my end and come up with a solution.