ArticleDirectory
Support for multiple frameworks
Output to multiple logging targets
Hierarchical logging Architecture
Xml configuration
Dynamic Configuration
Logging Context
Proven Architecture
Modular and extensible design
High Performance with flexibility
From: http://logging.apache.org/log4net/index.html
About Apache log4net
1. First, reference log4net. dll in the project, and then add a configuration file log4net. config in the project.
2. add a sentence to AssemblyInfo. cs in the Properties folder of the project.
Of course, you must first add using log4net; and then add [assembly: XmlConfigurator (ConfigFile = "
Namespace MyLog4net{Public static class Mylog4net{Public enum ErrorLogType{/// /// Fatal error log/// FatalLog,/// /// Error Log/// ErrorLog}
/// /// When a prompt is required, you must specify the log type, which is generally used when the system prompts you how to operate,/// This type should be used for even warning operations/// Public enum NormalLogType{/// /// Common operation log/// InfoLog,/// /// Warning log/// WarnLog,/// /// Debug log/// DebugLog}/// /// System Operation Log (info, wa
, which is hard to be opened after 5g. C. Specify the log size. For example, if the log size is 500 mb, only one log will be logged and will not exceed 500 mb.
Ii. Log4net Installation
1. Users can download the source code of log4net from the http://logging.apache.org/log4net.
2. decompress the package and load log4net
)
Using log4net(This is a very professional guide, which is translated below)
Log4net. dll(The compiled log4net. dll file can be directly added to your project .)
Log4net User Guide
1 Overview
1.1 The Advantages
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. 2 log4net Structure Log4net
The EF team launched a complete set of cache and SQL Execution log solutions, efproviderwrappers. Their practice is to add a layer of packaging on the original EF provider, and use this layer of packaging interception for data caching and log monitoring. The cached data is the native data returned by the database after query, and is not an entity object. This avoids the extreme negative impact of the entity object status on the cache. In addition, this cache is transparent to upper-layer data qu
Log Management-Log4net, log-log4net
Introduction
The log4net library is implemented by the Apache log4j framework on the Micorsoft. NET platform. It is a tool that helps programmers to output log information to various targets (such as the console, files, and databases. (Baidu encyclopedia)
In actual projects, log4net
Log4net
Http://cvs.apache.org/dist/incubator/log4net/1.2.9/incubating-log4net-1.2.9-beta.zip
There are a lot of related content on the Internet, and I have explained the same things. I just put them in my personal test step, because although there are many codes on the Internet, there are also many that cannot be successfully implemented.
It may be because many
Log4Net log configuration, log4net log
1. Add Log4net. dll reference
Copy Log4net. dll of release to the Lib folder and add references.
2. Add configuration in Web. Config (or App. Config.
(1) Add the configuration under the con
This article does not teach you a full understanding of log4net. It just wants to teach you how to use log4net1. Introduce the log4net. dll component.2. Create a configuration fileEither method is in Web. config or app. config.Add the following configuration sectionIn the configuration section above, you can use the copy function.
Add the definition of
Log4net logging, detailed configuration (for your own use), and log4net Logging
[From Baidu encyclopedia] The log4net library is based on the Apache log4j framework in Microsoft. NET platform is a tool that helps programmers output log information to various targets (console, files, databases, etc.
1. First Add a reference to
Log4net, c # log4net
In the project process, you must use the log function. I have made a set of logs for my projects, but I still use other mature dll, such as log4.
Log4-related documents are really many and comprehensive, but I still want to repeat this for the purpose of understanding new things.
First, put a small Demo on it.
There are five main components:
Log4net, c # log4net
Reference page:
Http://www.yuanjiaocheng.net/CSharp/csharprumenshili.html
Http://www.yuanjiaocheng.net/entity/mode-first.html
Http://www.yuanjiaocheng.net/entity/database-first.html
Http://www.yuanjiaocheng.net/entity/choose-development-approach.html
Http://www.yuanjiaocheng.net/entity/query-with-edm.html
In the project process, you must use the log function. I have made a set of logs f
log4net IntroductionObjectiveProject development, record the project log is necessary, if not to say the importance of the log (log can be seen as, the Aircraft's black box, or car driving recorder), according to the level of record, convenient for us to troubleshoot related issues, later project operations, but also a lot of convenience. Basically we enter a company, the development of what you are engaged in, the Company's product or project framewo
Hbinject.exe, hbmhly. dll, sys07003.dll, zsqf. dll, ytfa. dll, ytfb. dll, ytfc. dll, etc.
Original endurerVersion 1st
Yesterday, a friend said that he opened a flash file on the Internet. The Flash Player encountered an error and
(New fileinfo ("test. log4net "));In addition to initializing the configuration, the xmlconfigurator. configureandwatch () method also monitors the configuration file changes. Once modified, the configuration is automatically refreshed.We can also use xmlconfiguratorattribute to replace xmlconfigurator. config ()/configureandwatch (). configuratorattribute is used to define the configuration file name associated with assembly.Method 1: Associate with
Technorati label: log4net configuration, independent log4net. config, non-embedded
Example 1:
Vs2003The created Asp.net project, the log4net file is placed in the web. config file
1. Add a reference to log4net. dll (download DLL
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.