When logging from exe and dll to same log file, rolling file appender failes...
Logging Framework for C++
Brought to you by:
wilx
log4cplus configuration:
How to reproduce:
Workaround:
Diff:
You probably should never have two appenders opening the same file in the first place. You can have a single appender attached to multiple loggers. Doing that, using a single appender for multiple loggers, will fix the problem.
The core of the problem is that the files opened by
std::fstreamare not opened by the Visual Studio C++ standard library implementation in a way that would allow renaming (or deletion) while there are open handles to the file. This is not easy to fix or work around in any other way than outlined above.