This is a Windows implementation of the logrotate utility found in Linux platforms. The goal is to use the same command line parameters and files as the Linux version.
I've installed LogRotateWin on a Windows 7 server here at work, thanks for your efforts, and found a few things that I wasn't happy about:
Multiple spaces as separators caused errors about a file or path already having been added. But no logging, in debug mode, to identify the duplicate file name. (it was null).
TAB not allowed as a separator.
Comma not allowed as a separator. (This might be a problem now if file names are allowed to comntain commas/ Easily removed though.)
A spelling mistake in the word "constraint" in one of the string resources.
One space was mandatory before the opening '{' on a new section.
The processing on invalid characters in a path was such that newsplit was being assigned each character of the split string 35 times in all. There are 35 invalid characters and newsplit was being copied to and from split each time through the loop.
I've amended the code to fix the above. I think Visual Studio 2012 has regenerated the Strings.Designer.cs file - I didn't change it, but I've included it anyway. (I'm not a C# developer at all so I've no idea what these files are for!)
The removal of invalid characters from the file paths etc occurs once now at the start of the main loop, and this improves response times a bit as it's not continually assigning and reassigning split -> newsplit each time through the loop. There are 35 passes through the loop on my Windows 7 server as there are 35 invalid path characters.
Apologies if the coding standards are not to your liking. I'm a C programmer on Unix (when I have to) as opposed to this new fangled "java-like" stuff on Windows. :-)
Hope This Helps.
By the way, NOTIFEMPTY is listed on the wiki as being an allowed directive, but it's not catered for and gives a warning if used.
Afternoon "Plecos",
I've installed
LogRotateWin
on a Windows 7 server here at work, thanks for your efforts, and found a few things that I wasn't happy about:newspli
t was being assigned each character of thesplit
string 35 times in all. There are 35 invalid characters andnewsplit
was being copied to and fromsplit
each time through the loop.I've amended the code to fix the above. I think Visual Studio 2012 has regenerated the Strings.Designer.cs file - I didn't change it, but I've included it anyway. (I'm not a C# developer at all so I've no idea what these files are for!)
The removal of invalid characters from the file paths etc occurs once now at the start of the main loop, and this improves response times a bit as it's not continually assigning and reassigning
split
->newsplit
each time through the loop. There are 35 passes through the loop on my Windows 7 server as there are 35 invalid path characters.Apologies if the coding standards are not to your liking. I'm a C programmer on Unix (when I have to) as opposed to this new fangled "java-like" stuff on Windows. :-)
Hope This Helps.
By the way,
NOTIFEMPTY
is listed on the wiki as being an allowed directive, but it's not catered for and gives a warning if used.Cheers, Norm.