Webform client debugging tool log4javascript

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.