start_finish_logger.rb 330 B

12345678910111213
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Mixin
  3. module StartFinishLogger
  4. include ::Mixin::RailsLogger
  5. def log_start_finish(level, prefix)
  6. logger.public_send(level, "#{prefix} started.")
  7. yield
  8. logger.public_send(level, "#{prefix} finished.")
  9. end
  10. end
  11. end