This method is still kinda hard to follow because of the length. Maybe break it down to some private methods like:

```ruby
print_stream_header
start_line
print_message
end_line
```

And then in each of those methods have a single conditional for whether or not it does anything.