Method: Docman::Logging#with_logging

Defined in:
lib/docman/logging.rb

#with_logging(message = nil, type = 'debug') ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/docman/logging.rb', line 24

def with_logging(message = nil, type = 'debug')
  # logger.send(type, "#{prefix} - #{message} - start") if @log
  log("#{message} - start", type)
  result = yield
  log("#{message} - finish", type)
  # logger.send(type, "#{prefix} - #{message} - finish") if @log
  result
end