Class: BrmClient::Logger
- Inherits:
-
Object
- Object
- BrmClient::Logger
- Includes:
- Event
- Defined in:
- lib/brm_client/logger.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
-
#facet_id ⇒ Object
Returns the value of attribute facet_id.
-
#gateway ⇒ Object
readonly
Returns the value of attribute gateway.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
- #disconnect ⇒ Object
-
#initialize(application, gateway_options = {}, opts = {}) ⇒ Logger
constructor
A new instance of Logger.
- #sequence_number ⇒ Object
Methods included from Event
#action, #connect, #create, #delete, #describe, #location, #message, #register_event, #resource_event, #session_event, #session_expired, #share, #sign_in, #sign_in_failed, #sign_out, #sign_up, #system, #transaction, #unsubscribe, #update
Constructor Details
#initialize(application, gateway_options = {}, opts = {}) ⇒ Logger
Returns a new instance of Logger.
13 14 15 16 17 18 19 20 21 |
# File 'lib/brm_client/logger.rb', line 13 def initialize(application, = {}, opts={}) @application = application @options = { :timestamp_format => "timestamp" }.merge(opts) gateway_type = .delete(:type) || "File" [:application] ||= application @gateway = BrmClient::Gateway.const_get(gateway_type).new() end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
10 11 12 |
# File 'lib/brm_client/logger.rb', line 10 def application @application end |
#facet_id ⇒ Object
Returns the value of attribute facet_id.
11 12 13 |
# File 'lib/brm_client/logger.rb', line 11 def facet_id @facet_id end |
#gateway ⇒ Object (readonly)
Returns the value of attribute gateway.
10 11 12 |
# File 'lib/brm_client/logger.rb', line 10 def gateway @gateway end |
#user_id ⇒ Object
Returns the value of attribute user_id.
11 12 13 |
# File 'lib/brm_client/logger.rb', line 11 def user_id @user_id end |
Instance Method Details
#disconnect ⇒ Object
23 24 25 |
# File 'lib/brm_client/logger.rb', line 23 def disconnect @gateway.disconnect end |
#sequence_number ⇒ Object
5 6 7 8 |
# File 'lib/brm_client/logger.rb', line 5 def sequence_number @sequence_number ||= 0 @sequence_number += 1 end |