Module: WhoopsLogger
- Defined in:
- lib/whoops_logger/configuration.rb,
lib/whoops_logger.rb,
lib/whoops_logger/sender.rb,
lib/whoops_logger/message.rb,
lib/whoops_logger/strategy.rb,
lib/whoops_logger/message_creator.rb
Overview
Borrows heavily from Hoptoad Notifier by Tammer Saleh
Defined Under Namespace
Classes: Configuration, Message, MessageCreator, Sender, Strategy
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
-
.strategies ⇒ Object
Returns the value of attribute strategies.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
13 14 15 |
# File 'lib/whoops_logger.rb', line 13 def config @config end |
.strategies ⇒ Object
Returns the value of attribute strategies.
13 14 15 |
# File 'lib/whoops_logger.rb', line 13 def strategies @strategies end |
Class Method Details
.log(raw_data) ⇒ Object .log(strategy_name, raw_data) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/whoops_logger.rb', line 21 def log(strategy_name, raw_data = {}) if strategy_name.is_a? Hash log("default::basic", strategy_name) else = MessageCreator.new(strategies[strategy_name], raw_data) .create! (.) unless . end end |
.send_message(message) ⇒ Object
31 32 33 |
# File 'lib/whoops_logger.rb', line 31 def () Sender.new(WhoopsLogger.config.to_hash).(.to_hash) end |