[#BloombergLP-ball-FileObserver2-publish-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/FileObserver2.adoc[FileObserver2]::publish
:relfileprefix: ../../../
:mrdocs:

`publish` overloads

== Synopses

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

Process the specified log `record` having the specified publishing `context` by writing `record` and `context` to the current log file if file logging is enabled for this file observer&period; The method has no effect if file logging is not enabled, in which case `record` is dropped&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
void
xref:BloombergLP/ball/FileObserver2/publish-02.adoc[publish](
    xref:BloombergLP/ball/Record.adoc[Record] const& record,
    xref:BloombergLP/ball/Context.adoc[Context] const& context) override;
----

[.small]#xref:BloombergLP/ball/FileObserver2/publish-02.adoc[_» more&period;&period;&period;_]#

Process the record referenced by the specified `record` shared pointer having the specified publishing `context` by writing the record and `context` to the current log file if file logging is enabled for this file observer&period; The method has no effect if file logging is not enabled, in which case `record` is dropped&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
void
xref:BloombergLP/ball/FileObserver2/publish-01.adoc[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]#xref:BloombergLP/ball/FileObserver2/publish-01.adoc[_» more&period;&period;&period;_]#


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