Added a stream class for use with the logging module.