#include <toast/log/rotation_policies.hpp>
The test method is called by the output policies' message method, and therefore should be an accurate count of the number of messages.
By default, the maximum number of messages is ZERO, this is equivalent to a limitless number of messages. So, without setting the max_messages, you will effectively never rotate. Additionally, a "message" is an abstract concept which pertains to the logger during runtime. As such, there is no methodology to determine the number of messages within a preexisting log. Therefore, data that preexists in a file will not be taken into account by this policy.