Log4r database outputter


#1

I recently had a look at Log4Net before we decided to go with Ruby On
Rails. As
part of evaluating Ruby and Rails, I had a look at Log4r as well.

We want to use Log4r, and we would have a logger that output all levels
to
console and stdout, and everything above Warn to a database table. But
the
deployment of log4r doesn’t come with a database outputter. Is there
any
reason for this?

Anyway, I’ve written an outputter for log4r that uses Ruby DBI and the
ODBC
driver for MySQL. I’ve also enhanced the basic formatter and logevent
to accept
an optional extra field after the message. This eventually gets written
to the
userid column in the database so that we can find out who’s been
wrecking our
system :-D. Because the field is optional, Rails is happy to use log4r
to
output its own messages.

I tried contacting the author of Log4r, but got no response. Does
anyone want
these enhancements? Should I upload the changes somewhere? In any case
I’d
like somebody to peer review the enhancements in case there are
scalability
issues etc.

Cheers,

Ed.