Log4Net is an open-source logging component with well-known features. It allows us to log .NET applications to a variety of media, including files, consoles, window logs, and databases (MS SQL Server, Access, Oracle9i, DB2, SQLite), and we can also set and mark the level of logs.
I think everyone is familiar with Log4Net, so I will jump straight to the topic, where I will talk about how to configure databases and customize table fields (i.e., custom attributes). There are too many things on the Internet about the configuration instructions of Log4Net, and there is a lot about database configuration on the Internet. But I found that many of them were going around and not really solving the problem of database configuration and custom table fields, and most of the solutions they came up with were just pieced together and could not be used.
The code called is as follows:
Database creation script:
Finally, attach the source code:
Tourists, if you want to see the hidden content of this post, please Reply
|