doc: Add documentation for log module and cleanup.