I accidentally found this little Dongdong when I checked the information on the Internet. I found not much information in my blog. I wrote it here, hoping to bring convenience to more friends.
Literally, it is a log recording tool used on the webform client. We can avoid adding a window when debugging is required. alert () method to view the debugging result. is it very similar to log4j and log4net? Yes, it was designed according to this class library and supports multiple browsers.
Official website address: http://log4?cript.org/index.htmlcurrently, the latest version is 1.4.1,some of my compressed files
Let's take a look at how to use it first? The call method is simple! -1
Figure-1
After the JS file is introduced, define the variable at the page level. The result is-2.
Figure 2
Another reference blog: http://j2ee.blog.sohu.com/62086962.html
During the demo process, you can also input the information to the background and use the Ajax method, as shown in-3. This method can indeed trigger the backgroundCodeHere I use the generic handler file, which is more convenient.
The parameter of the ajaxappender method is URL, that is, the background page address. I thought I could write logs directly. if degub is used, the information of the degub string is directly transmitted to the background. if the method shown in figure-3 is feasible, isn't it superfluous? If you are interested, you can continue to study it!
Figure-3
In general, we can make it easier. With this tool, it is much easier to debug the webform front-end Page code.
File
Log4javascript-1.4.1
Examplewebform (vs2010)