log4net is an excellent third-party log framework, which can be easily loaded into the development project (refer to the log4net dll, and then configure some basic parameters), helping programmers output log information to various destinations, common ones include text, database, Windows logs, email, memory buffer and other targets.
If nothing else, quote the dll first, I won't talk about this, the following is loghelp:
log4net.config file configuration:
In the last line of the AssemblyInfo.cs file in the project, add:
main function entry point adds:
Last log output:
INFO 2016-06-16 14:43:54,983 [loginfo] Add pushmessage exception INFO 2016-06-16 14:45:32,449 [loginfo] Add pushmessage exception
log4net.config
(1.76 KB, Number of downloads: 13)
|