First install log4net in your application using NuGet packages.
Add the following configurations in the web.config file.
You can find more logging formats here.
logs folders is created on the root directory path of the web application. Inside the folder log.txt file is created.
Log records are appended to the same log.txt file.
When the file size reaches 10MB it'll be renamed to log.txt.1 and it''l continue till log.txt.9.
Sample log records.