I am looking for the best way to customize my Rails log entries (I want to add the user ID in there). I am using Rails 2.1.2. The only way I've found so far is to override method "add" of class BufferedLogger (as defined in active_support/lib/active_support).
But it ain't pretty: I have to copy all the code in there and it is closely tied to the current implementation. Is there a better way? I found this on the Google: http://pandejo.blogspot.com/2007/08/customize-logger-message-format.html but it seems outdated. One day, I might create a specific audit log, but it is overkill for what I need: http://maintainable.com/articles/rails_logging_tips#audit-logs Cheers.