Class: Subserver::MessageLogger
- Inherits:
-
Object
- Object
- Subserver::MessageLogger
- Defined in:
- lib/subserver/message_logger.rb
Instance Method Summary collapse
Instance Method Details
#call(message) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/subserver/message_logger.rb', line 4 def call() start = Time.now logger.info("start") yield logger.info("done: #{elapsed(start)} sec") rescue Exception logger.info("fail: #{elapsed(start)} sec") raise end |