[#BloombergLP-ball-TestObserver-2constructor-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/TestObserver.adoc[TestObserver]::TestObserver :relfileprefix: ../../../ :mrdocs: Create a test observer writing to the specified `stream`. == Synopsis Declared in `<ball_testobserver.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit TestObserver( std::ostream* stream, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- == Description Create a test observer having a unique integer identifier, whose `publish` method will print diagnostic information (if any) to the specified `stream`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. By default, this observer prints nothing to `stream`. Note that the `setVerbose` method can affect this default behavior. [.small]#Created with https://www.mrdocs.com[MrDocs]#