adds optional LogStream for cpp iostream-style logging