[#BloombergLP-ball-FilteringObserver-publish-0b]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/FilteringObserver.adoc[FilteringObserver]::publish
:relfileprefix: ../../../
:mrdocs:

Process the specified log `record` having the specified publishing `context`&period; Forward `record` and `context` to the `publish` method of the observer supplied at construction if the filter callback supplied at construction returns `true` for `record` and `context`, and ignore (filter out) `record` and `context` otherwise&period; The behavior is undefined if `record` or `context` is modified during the execution of this method&period;

== Synopsis

Declared in `&lt;ball&lowbar;filteringobserver&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
void
publish(
    xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;Record const&gt;] const& record,
    xref:BloombergLP/ball/Context.adoc[Context] const& context) override;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
