Module: LogjamAgent::SelectiveLogging
- Extended by:
- SelectiveLogging
- Included in:
- LogjamAgent, SelectiveLogging
- Defined in:
- lib/logjam_agent/selective_logging.rb
Instance Method Summary collapse
- #logdevice_only ⇒ Object
- #logdevice_only? ⇒ Boolean
- #logjam_log_selector ⇒ Object
- #logjam_log_selector=(selector) ⇒ Object
- #logjam_only ⇒ Object
- #logjam_only? ⇒ Boolean
Instance Method Details
#logdevice_only ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/logjam_agent/selective_logging.rb', line 16 def logdevice_only old_selector = logjam_log_selector self.logjam_log_selector = :logdevice_only if selective_logging_enabled yield ensure self.logjam_log_selector = old_selector end |
#logdevice_only? ⇒ Boolean
36 37 38 |
# File 'lib/logjam_agent/selective_logging.rb', line 36 def logdevice_only? logjam_log_selector == :logdevice_only end |
#logjam_log_selector ⇒ Object
24 25 26 |
# File 'lib/logjam_agent/selective_logging.rb', line 24 def logjam_log_selector Thread.current.thread_variable_get(:logjam_log_selector) end |
#logjam_log_selector=(selector) ⇒ Object
28 29 30 |
# File 'lib/logjam_agent/selective_logging.rb', line 28 def logjam_log_selector=(selector) Thread.current.thread_variable_set(:logjam_log_selector, selector) end |
#logjam_only ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/logjam_agent/selective_logging.rb', line 8 def logjam_only old_selector = logjam_log_selector self.logjam_log_selector = :logjam_only if selective_logging_enabled yield ensure self.logjam_log_selector = old_selector end |
#logjam_only? ⇒ Boolean
32 33 34 |
# File 'lib/logjam_agent/selective_logging.rb', line 32 def logjam_only? logjam_log_selector == :logjam_only end |