meghaAgrawal
Programmer
I am creating a log system where I will have say 5 log files named like <whatever>.1.log, <whatever>.2.log, ..., <whatever>.5.log
I will start writing into first log and subsequent info gets appended into the log file till it is full to the capacity. Then I will open up second log and so on till the last log is full. Afterwards I plan to cycle back and start rewriting into first log.
Now is the time to ask for valuable suggestions and feedbacks:
1. How do I determine that the log file is full and I should jump to the next log? What size/capacity would be good for a txt file on windows platform?
2. How will I know which log file should be used at a particular time? Say I have used up first 3 logs and now I run my program which needs a log - how would the program know that it should use 4th log?
I was thinking to use the DateLastModified property of file object. But I was not able to make it work. Ideas?
I will start writing into first log and subsequent info gets appended into the log file till it is full to the capacity. Then I will open up second log and so on till the last log is full. Afterwards I plan to cycle back and start rewriting into first log.
Now is the time to ask for valuable suggestions and feedbacks:
1. How do I determine that the log file is full and I should jump to the next log? What size/capacity would be good for a txt file on windows platform?
2. How will I know which log file should be used at a particular time? Say I have used up first 3 logs and now I run my program which needs a log - how would the program know that it should use 4th log?
I was thinking to use the DateLastModified property of file object. But I was not able to make it work. Ideas?