Click here to Skip to main content
15,946,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear member
pls see this link

log4net Tutorial[^]

i want to autogererate txt page date wise meas every day new txt page generated with error message .

Thank you

1 solution

I guess you are want to create log files on daily basis.

If so, here is the general logic for it. Just create a new log file based on datetime. Have a defined naming convention, like: MyLogFile_mmddyyyy.txt

Now, before any logging, check today's date. Based on date, you know the log filename. Search in the directory related and see if it exists. If so, write in it or else create one and then write.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900