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

Rotate the log file when its size exceeds the specified `size`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
rotateOnSize(int size);
----

== Description

Set this file observer to perform log file rotation when the size of the file exceeds the specified `size` (in kilobytes)&period; This rule replaces any rotation&hyphen;on&hyphen;size rule currently in effect&period; The behavior is undefined unless `size &gt; 0`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *size*
| maximum log file size in kilobytes before rotation
|===


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