[#BloombergLP-ball-AsyncFileObserver-setOnFileRotationCallback]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/AsyncFileObserver.adoc[AsyncFileObserver]::setOnFileRotationCallback
:relfileprefix: ../../../
:mrdocs:

Set the callback invoked after each log file rotation attempt&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setOnFileRotationCallback(xref:BloombergLP/ball/AsyncFileObserver/OnFileRotationCallback.adoc[OnFileRotationCallback] const& onRotationCallback);
----

== Description

Set the specified `onRotationCallback` to be invoked after each time this async file observer attempts to perform a log file rotation&period; The behavior is undefined if the supplied function calls either `setOnFileRotationCallback`, `forceRotation`, or `publish` on this async file observer (i&period;e&period;, the supplied callback should _not_ attempt to write to the `ball` log)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *onRotationCallback*
| callback invoked after each rotation attempt
|===


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