Hi,
Can anybody give me a hint on how to add a counter inside the logfile?
For example, if at first, the log file was created, it will write the current counter number, let say Log1. Everytime the application is open/launch the loop start and writes Log1, Log2, Log3, Log4 and so on for the same log filename if exist. If the file does not exist or let say a new log file was created the counter will reset to 1 and write this counter number to log file as well as the next number in the loop.
I used the below code snippet to open/create a log file.
m_oLogFileStream.open(pcLog, ios::out|ios::app|ios::in, filebuf::sh_read|filebuf::sh_write);
hope you can help me on this
thanks & regards
gilmar