Write messages to the log stream instead of cout.