I took my first real stab at open-source development today when I made LogZipper.NET available to the world. It’s a console application written in C# and requiring the .NET framework. I wrote it mostly over the weekend using a command-line parser from the C# compiler team and SharpZipLib from the developers of SharpDevelop. I definitely couldn’t have done it without those two libraries—well, I could have but it would have taken me a lot longer.
I wrote this application because we needed a tool at work to rotate log files and zip them up. It was becoming a big pain to manually process the hundreds of megabytes of log files our web servers were processing each and every day. With the addition of some new subsystems, it was on its way to several gigabytes per day. Moving those enormous files over the network was tedious and it was only going to get worse.
We searched and searched for a free utility out there that would do this. I was familiar with DNStran, which my LogJammer shell script uses to perform much the same task (and more since it also does DNS lookup). Finally, we found the closest thing and requested a quote for customization to our needs. He offered to do it for $1,000 with source code. I thought this was a reasonable amount but much more than it needed to be since this wasn’t a complicated application.
Or so I thought. At first, I was going to rotate the log files using the date values stuck in the file’s metadata. I dropped that idea when I downloaded some log files from this site’s web server for testing purposes. After downloading, I realized that the file create, modify, and write dates were all the same—the moment they were transported to the local filesystem. I eventually decided to use the pattern mask that was available as one of the command-line parameters.
There’s still a lot to do. You’re welcome to download it, modify it, and offer suggestions on how to make it better. I’d love it if you file any bug reports over at the project page. I’ve also set up the home page for LogZipper.NET that will eventually contain links and additional documentation.