eelisdotnet
Programmer
Hi
I'm trying to figure out the best practice to manage log reports generated by my application.
The application generates a log file for each process, and those files are all saved under a specific directory. The log file name is combined of the process name and the date-time of the creation (process.20060221-1605.log).
The idea is to have a class that manage all the log files. There should be a limit for the amount of log files in the folder so that every time a new log is written, it has to check that there are not too many files and delete the oldest in case of too many.
Again, I'm looking for the best practice to implement it if one can share his/her ideas.
Thanks in advance!
I'm trying to figure out the best practice to manage log reports generated by my application.
The application generates a log file for each process, and those files are all saved under a specific directory. The log file name is combined of the process name and the date-time of the creation (process.20060221-1605.log).
The idea is to have a class that manage all the log files. There should be a limit for the amount of log files in the folder so that every time a new log is written, it has to check that there are not too many files and delete the oldest in case of too many.
Again, I'm looking for the best practice to implement it if one can share his/her ideas.
Thanks in advance!