Skip to content

Instantly share code, notes, and snippets.

@miyucy
Created June 4, 2009 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miyucy/123508 to your computer and use it in GitHub Desktop.
Save miyucy/123508 to your computer and use it in GitHub Desktop.
# nofity AR sql-log
# RAILS_ROOT/lib/log2n.rb
require 'n'
module ActiveRecord::ConnectionAdapters # :nodoc:
class AbstractAdapter
protected
def format_log_entry(message, dump)
n "%s %s" % [message, dump]
end
end
end
# add to RAILS_ROOT/config/environment.rb
require 'log2n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment