I write logging results of working on a data file with my program in a file, which also contains the name of the data file in the log file name, and for reproducibility the data file content is also logged. If the data file is correct, it works OK. If the data file is bad, then the further work is refused; it works fine. In my GUI environment, the user might have a second attempt, and second time provides a correct data file, under a different name. However, the second reading aborts the program, because in the block
google::SetLogDestination(0, LogFileName.c_str() );
google::InitGoogleLogging(FileName);
the initialization command occurs second time. How can I restart, terminate, reinitalize, close, or whatever called, the logging?