Module: ARQLogger
- Defined in:
- lib/a_r_q_logger.rb,
lib/a_r_q_logger/version.rb,
lib/a_r_q_logger/initializer.rb
Defined Under Namespace
Modules: Initializer Classes: Result
Constant Summary collapse
- VERSION =
"0.0.8"
Class Attribute Summary collapse
-
.instantiating ⇒ Object
Returns the value of attribute instantiating.
-
.store ⇒ Object
Returns the value of attribute store.
Class Method Summary collapse
Class Attribute Details
.instantiating ⇒ Object
Returns the value of attribute instantiating.
5 6 7 |
# File 'lib/a_r_q_logger.rb', line 5 def instantiating @instantiating end |
.store ⇒ Object
Returns the value of attribute store.
5 6 7 |
# File 'lib/a_r_q_logger.rb', line 5 def store @store end |
Class Method Details
.instantiate ⇒ Object
16 17 18 |
# File 'lib/a_r_q_logger.rb', line 16 def instantiate self.instantiating += 1 if instantiating end |
.log(&block) ⇒ Object
20 21 22 23 24 |
# File 'lib/a_r_q_logger.rb', line 20 def log(&block) start block.call finish end |
.pass(event) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/a_r_q_logger.rb', line 7 def pass(event) return unless store payload = event.payload if payload[:name] && !ActiveRecord::LogSubscriber::IGNORE_PAYLOAD_NAMES.include?(payload[:name]) store.push(event.duration) end end |