Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a huge logfile being written by a vendor's application. Let's assume the vendor won't do anything that we ask. Is there any way of rotating that logfile somehow? We're looking at about 300 MB an hour being written - I'd much rather chunk that into 10 MB pieces, and let anything older than a day or over 1000 files fall off a cliff.

(I know I know, possible duplicate of How do you rotate apache logs on windows without interrupting service? )

Aha - the Chomp log was dead, but searching for "chomp logrotate brought me to it's new site. I'll give it a try tomorrow and reply if I like it. I'd still like to hear about software anyone else is using that works for this.

share|improve this question
Is periodically restarting your service going to cause problems? Can the application send its output to a program, or a network socket? – Zoredache Feb 8 '12 at 23:35
It can log to stdout, or to a named file. Possibility to restart - possible, not certain yet. – mfinni Feb 9 '12 at 2:24
There are hundreds of scripts for log rotations. For example, search Google for "powershell log rotation". – Jim B Apr 4 '12 at 19:29
That one specifically handles old (stale) files that are no longer being written to, which is a fairly easy case. I was looking for something to handle a single file. – mfinni Apr 4 '12 at 20:33
Searching that forum for "logrotate" has 0 results. – mfinni Apr 4 '12 at 20:34
up vote 6 down vote accepted

As much as I wince at the suggestion, installing Cygwin is one of the very few options that you have available to you. From there, you can use logrotate.

share|improve this answer
Not scared of Cygwin if it includes a good solution, although I'm always mindful of not using a cannon to swat a fly. – mfinni Apr 4 '12 at 13:26
Sorry, gotta pull back my checkmark. I don't see logrotate in the catalog for the current Cygwin. It might build properly from source, but the MAKEFILE doesn't include anything for CYG or WIN. – mfinni Apr 4 '12 at 13:42
@mfinni Alas, it's not in the package, although others have used it in Cygwin. =/ – Wesley Apr 4 '12 at 15:32
Sounds good to me – mfinni Apr 4 '12 at 17:23
I confirm the ability to move the log file of Cygwin's stock syslog-ng. – ivan_pozdeev Feb 20 '15 at 8:07

Have a look at logwot8, which is a packaging of logrotate, a limited shell environment and required cygwin layer components ready to work out of the box (4 MB installer size). You need to customize configuration file according to your reqiurements. It is free for use and distribution under 2-sentence BSD license.

Disclaimer: I am the developer :-)

share|improve this answer
Any perspective for sources? To, say, recompile it for the installed Cygwin rather than haul a separate one around? – ivan_pozdeev Feb 20 '15 at 8:09
You can download logrotate sources used in logwot8 here. – itefix Feb 23 '15 at 11:38

I haven't used it yet, but LogRotateWin is a native implementation of logrotate for Windows that looks promising. At least it doesn't require Cygwin.

share|improve this answer
I have used this on windows 2012 R2. Works perfectly. choco install logrotate then edit c:\program files (x86\LogRotate\Content\logrotate.conf – spuder May 18 at 21:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.