start_finish_logger.rb 253 B

1234567891011
  1. module Mixin
  2. module StartFinishLogger
  3. include ::Mixin::RailsLogger
  4. def log_start_finish(level, prefix)
  5. logger.public_send(level, "#{prefix} started.")
  6. yield
  7. logger.public_send(level, "#{prefix} finished.")
  8. end
  9. end
  10. end