Log4net User Guide

Source: Internet
Author: User

 

1Introduction

1.1Log4netAdvantages:

Almost all large applications have their own APIs for tracking and debugging. Once a program is deployed, it is unlikely that special debugging tools will be used. However, an administrator may need a powerful log system to diagnose and fix configuration problems.

Experience shows that logging is often an important part of the software development cycle. It has the following advantages: it provides a precise environment when the application is running, allowing developers to locate bugs in the application as soon as possible; once the log output code is added to the program, logs can be generated and output during the program running without manual intervention. In addition, log information can be output to different places (such as the console and files) for future research.

Log4net is a log record package designed for this purpose and used in the. NET development environment.

1.2Log4netInstallation:

You can download the source code of log4netfrom http://logging.apache.org/log4net. After the package is decompressed, load log4net. sln to Visual Studio. NET in the decompressed src directory. After compilation, you can obtain log4net. dll. To add the log function to your program, you only need to introduce log4net. DLL into the project.

2Usage

2.1 Introduction to usage:

Please refer to the blog http://www.cnblogs.com/dragon/archive/2005/03/24/124254.html of mosun

If Baidu has limited space and wants to take the above notes, he can only make a blog link to moji, hoping to help those who are interested in it. Thank you for sharing your thanks!

2.2 usage routine

Please refer to Zhou Gong (zhoufoxcn)'s blog http://blog.csdn.net/zhoufoxcn/archive/2008/03/26/2220533.aspx

The routines in his blog can implement simple log functions and help you learn how to use logs. Thank you for sharing them!

 

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.