Crawling through my production.log file is a pain. Is there any way I
can have rails log all this information to a database table, instead
of, or in addition to the production.log file? Ideally the DB table
would have separate columns for some of the log details, like IP
address, controller, action, errors, trace, etc. The idea is that I
could then filter the log data to quickly see hits on a particular
action, or from a particular IP address, etc.
I know I could parse production.log and throw it in the database, but
I'd prefer to have that done up front without the need for a log
parser.
I have a method in my application helper that displays the number of hits (ya, i know, old school hit counter, but what client wants, client gets). So, anyway, in addition to keeping up with the current hit count, I log the header data to the db.