Move masking functionality to BuildLogger.
Note: This might require us to improve the masking algorithms, selectively enable masking only where it makes sense for some streams.