ApacheMongoLogger is a project mainly written in Ruby, it's free.
Log apache request to mongodb
This works for apache2 log by using:
LogFormat "%v:%p %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" vhost_combined CustomLog "|/usr/bin/ruby /etc/apache2/logger/bin/log.rb" vhost_combined