Merge "Partially restoring reverted logging" into sc-v2-dev