Module: RabbitFeed
- Extended by:
- RabbitFeed
- Included in:
- RabbitFeed
- Defined in:
- lib/rabbit_feed.rb,
lib/rabbit_feed/event.rb,
lib/rabbit_feed/client.rb,
lib/rabbit_feed/version.rb,
lib/rabbit_feed/consumer.rb,
lib/rabbit_feed/producer.rb,
lib/rabbit_feed/connection.rb,
lib/rabbit_feed/configuration.rb,
lib/rabbit_feed/event_routing.rb,
lib/rabbit_feed/testing_support.rb,
lib/rabbit_feed/event_definitions.rb,
lib/rabbit_feed/json_log_formatter.rb,
lib/rabbit_feed/consumer_connection.rb,
lib/rabbit_feed/producer_connection.rb,
lib/rabbit_feed/testing_support/testing_helpers.rb,
lib/rabbit_feed/testing_support/test_rabbit_feed_consumer.rb,
lib/rabbit_feed/testing_support/rspec_matchers/publish_event.rb
Defined Under Namespace
Modules: Consumer, Producer, TestingSupport Classes: Client, Configuration, ConfigurationError, Connection, ConsumerConnection, Error, Event, EventDefinitions, EventRouting, JsonLogFormatter, ProducerConnection, ReturnedMessageError, RoutingError
Constant Summary collapse
- VERSION =
'2.3.6'
Instance Attribute Summary collapse
-
#application ⇒ Object
Returns the value of attribute application.
-
#configuration_file_path ⇒ Object
Returns the value of attribute configuration_file_path.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#log ⇒ Object
Returns the value of attribute log.
Instance Method Summary collapse
Instance Attribute Details
#application ⇒ Object
Returns the value of attribute application.
29 30 31 |
# File 'lib/rabbit_feed.rb', line 29 def application @application end |
#configuration_file_path ⇒ Object
Returns the value of attribute configuration_file_path.
29 30 31 |
# File 'lib/rabbit_feed.rb', line 29 def configuration_file_path @configuration_file_path end |
#environment ⇒ Object
Returns the value of attribute environment.
29 30 31 |
# File 'lib/rabbit_feed.rb', line 29 def environment @environment end |
#log ⇒ Object
Returns the value of attribute log.
29 30 31 |
# File 'lib/rabbit_feed.rb', line 29 def log @log end |
Instance Method Details
#configuration ⇒ Object
31 32 33 |
# File 'lib/rabbit_feed.rb', line 31 def configuration @configuration ||= (Configuration.load configuration_file_path, environment, application) end |
#default_logger ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/rabbit_feed.rb', line 41 def default_logger if File.directory? 'log' Logger.new 'log/rabbit_feed.log', 10, 100.megabytes else Logger.new STDOUT end.tap do |log| log.formatter = RabbitFeed::JsonLogFormatter log.level = Logger::INFO end end |
#exception_notify(exception) ⇒ Object
35 36 37 38 39 |
# File 'lib/rabbit_feed.rb', line 35 def exception_notify exception if defined? Airbrake (Airbrake.notify_or_ignore exception) if Airbrake.configuration.public? end end |