Adapter Logging: prevent OutOfMemoryError caused by a lot of files in a
directory