RVLogger - a ruby logging facility
As the number of virtual hosts on my vserver increased massively I searched for an alternative to cronolog. I used cronolog, a program for log rotation, in combination with lighttpd for every vhost. The result was that the more vhosts I added, the more cronolog processes had to be started. This consumed a lot of memory and cpu time.
The solution to this problem is simple: I need a program that automatically creates a log directory for every vhost and does rotation.
A program that serves this purpose is vlogger, which is written in Perl and allows tracking traffic per vhost to a database based on the weblogs. While this is a nice feature, vlogger did not completely fit my needs as it requires a dedicated logging directory and therefore can't be integrated into my existing directory structure. I forked the project and implemented logging into subdirectories and logging for "known-hosts" only (which basically means that if the logging directory does not exists for a vhost its logs get written to "default").
Shortly after commiting my version of vlogger to github I found rvlogger, an incomplete port of the original vlogger to ruby. As I'm a little addicted to Ruby I took rvlogger, and started implementing the missing features. My version of rvlogger is not compatible to vlogger because of a different database structure and file-based configuration, but it currently works very smoothly on my production server.
I'm using MySQL as database backend for rvlogger and lighttpd 1.4.26 to serve my vhosts. One instance of rvlogger replaced more than 80 cronolog processes for me.
Links:
- vlogger fork on github (Perl)
- rvlogger fork on github (Ruby)
Comments
http://www.love-charms.net