I start Cef and initialize it using a certain log file, say /tmp/mylog.txt
At some point in time, based on some triggered event, I have code that gets invoked & it renames the file using rename(): http://www.cplusplus.com/reference/cstdio/rename/
which basically renames /tmp/mylog.txt into /tmp/mylog-1.txt
followed by the creation of an empty new file:
FILE* pFile;
pFile = fopen("/tmp/mylog.txt", "w");
if (pFile != NULL) {
fclose(pFile);
}
This goes well , except that Cef is not aware and it continues to write to the original file, even though it has been renamed to: /tmp/mylog-1.txt
So it continues to write to /tmp/mylog-1.txt while /tmp/mylog.txt says empty!
Is there a way to reset the logging on Cef so that it writes to the newly created log file / (i.e. the same file name as it used to write to, i.e. /tmp/mylog.txt)
I don't want to shutdown Cef just for this file rotation implementation..
Thank you!