A singleton object through which all diagnostic messages are reported. The singleton is used to configure the destination of the messages. This is actually the most traditional and common pattern in diagnostic output since the emergence of the CeeLanguage. Printf is an example of this pattern. Usually tied to the stdout stream, printf takes data of any kind when properly formatted and converts it a character stream that is sent one location.
A slight evolution of this pattern in a lot of CeePlusPlus code is a global print object that can print the arguments passed to it, to a dynamically defined location, a log file, or a stdout location.
This pattern can be made thread safe through the use of a mutex, but is generally less useful than it is cumbersome, an improved approach would be DistributedDiagnosticLogger?
See implementations in LogForJava LogForRuby