Hi all,
I got a multi-threaded app, all threads have their own Logger using newRollingFileLogger as first action in the thread
As I am using a DB, each night there is a Vacuum on the sqlite DB and I close all threads to be sure the GC could handle any possible things. Then I restart threads after the DB vacuum. The apps is runnings 24/7.
I just notice that I do not know how to close Loggers, there is no close() and do not know how to get the file from the Logger to close it when the thread is done.
So, each day, it creates a new Log for each thread, quite ugly, old files can not be deleted either. My log filename get the time and the pid in the name so new Logs means new Loggers. Did not see that before because I was using the same name for the Logger before, and it seems that even closing the thread does not closing the file.
Any idea to handle this properly?
Thanks