Module: Hammock::ModelLogging::InstanceMethods

Includes:
Logging::Methods, Utils::Methods
Defined in:
lib/hammock/model_logging.rb

Instance Method Summary collapse

Methods included from Logging::Methods

#dlog, #log, #log_concise, #log_fail, #log_hit, #log_hit_request_info, #log_hit_route_info, #report

Instance Method Details

#log_with_model(*args) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/hammock/model_logging.rb', line 19

def log_with_model *args
  opts = args.extract_options!

  message = "#{self.class}<#{self.id}>#{(' | ' + args.shift) if args.first.is_a?(String)}"

  log_without_model *args.unshift(message).push(opts.merge(:skip => (opts[:skip] || 0) + 1))
end