[#BloombergLP-ball-FileObserver-OnFileRotationCallback]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/FileObserver.adoc[FileObserver]::OnFileRotationCallback
:relfileprefix: ../../../
:mrdocs:

Alias for a user&hyphen;supplied callback invoked after log file rotation&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
typedef xref:BloombergLP/ball/FileObserver2/OnFileRotationCallback.adoc[FileObserver2::OnFileRotationCallback] OnFileRotationCallback;
----

== Description

`OnFileRotationCallback` is an alias for a user&hyphen;supplied callback function that is invoked after the file observer attempts to rotate its log file&period; The callback takes two arguments&colon; (1) an integer status value where 0 indicates a new log file was successfully created and a non&hyphen;zero value indicates an error occurred during rotation, and (2) a string that provides the name of the rotated log file if the rotation was successful&period; E&period;g&period;&colon; &grave; void onLogFileRotation(int rotationStatus, const bsl&colon;&colon;string&amp; rotatedLogFileName)&semi; &grave;


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