Closed enrico-dalla-via closed 5 years ago
I found the workaround solution, had to call removeAppender(m_FileAppender); create new fileAppender with a new filename and re-register it with registerAppender(m_FileAppender);
Which exact exception are you getting? This behavior seems pretty strange to me and seemingly nothing in FileAppender source points to the possibility of this exact situation. If it would be possible for you to provide a simple test application reproducing this scenario it will help a lot with diagnosing and possibly fixing the problem.
Since no comments came on that issue in 3 years I'm closing it. Feel free to reopen it with more info, if there is any.
HI, I'm using this library and it seems to work very good, but today I test the change of filename at runtime (basically I'm using a Qtimer to periodically check if the reference date is below at least 1 day from the current date. If yes, I'm calling setFileName to change the name of log file) and I got an exception every time I'm calling this function (I don't understand why, since the library has a Qmutex to protect the file name) more than 1 time.
Any suggestion or more information you need to understand what happens?
Thanks