LOG: Add a worker thread for logs, it will launch the `flush` operation in a thread-safe way when logs are available