Module: Offshore::Logger
Instance Method Summary collapse
Instance Method Details
#error(message) ⇒ Object
18 19 20 |
# File 'lib/offshore/server/logger.rb', line 18 def error() say(:error, ) end |
#info(message) ⇒ Object
14 15 16 |
# File 'lib/offshore/server/logger.rb', line 14 def info() say(:info, ) end |
#say(type, message) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/offshore/server/logger.rb', line 5 def say(type, ) = "[Offshore][#{type}][#{Time.now.to_i}][#{Time.now}] #{}" if defined?(Rails) Rails.logger.send(type, ) else puts end end |