Please refer to the LogFile directive for the preferred way to implement EZproxy log file rotation.
The balance of this technote appears for historic reference.
Here is a sample batch file to rotate the ezproxy.log file with versions of EZproxy 2.2 and later running on Windows:
if exist %tn% del %tn%
ezproxy log %tn%
type %tn% >>%fn%
If you save this script under a name such as c:\ezproxy\rotate.bat, then you can configure Windows to run it on a regular basis using the at command. Sample usage might include:
at 1:00 /every:1 c:\ezproxy\rotate.bat
at 1:00 /every:su c:\ezproxy\rotate.bat
at 1:00 /every:m,t,w,th,f,s,su c:\ezproxy\rotate.bat
Each of these lines demonstrates rotating the ezproxy.log file at 1 AM, with the first rotating on the first of every month, the second on every Sunday morning, and the third on every day of the week.