Hi,
Iam creating one debug log in my c++ application through the below code.
iam writing the statements in to this log by using fprintf().
As the .exe where i have put this mechanism runs continuously,th e size of log file is increasing gradually.
Could you please let me know
1)If there is any way to restrict the Log file size,if the file reaches the mentioned size,the file should be discarded and logging should be done in another file with the same name.
{OR}
2)Put a time interval,once after that interval is elapsed, a new log file should be created.
Iam creating one debug log in my c++ application through the below code.
Code:
file *log;
log = fopen("C:\\snmp\\Applicationlog.txt", "w");
As the .exe where i have put this mechanism runs continuously,th e size of log file is increasing gradually.
Could you please let me know
1)If there is any way to restrict the Log file size,if the file reaches the mentioned size,the file should be discarded and logging should be done in another file with the same name.
{OR}
2)Put a time interval,once after that interval is elapsed, a new log file should be created.
Comment