Module: LogListener
- Defined in:
- lib/dm-rails/railties/log_listener.rb
Instance Method Summary collapse
Instance Method Details
#log(message) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/dm-rails/railties/log_listener.rb', line 27 def log() ActiveSupport::Notifications.instrument('sql.data_mapper', :name => 'SQL', :sql => .query, # TODO think about changing the key to :query :start => .start, :duration => .duration, :connection_id => self.object_id ) super rescue Exception => e ::DataMapper.logger.error "[datamapper] #{e.class.name}: #{e.}: #{.inspect}}" end |