Fix logging problems with multiple documents

Introduce a single list with records in the new log module.