Captures logs in memory and intelligently saves them to disk