Module: Logtail::Integration
- Defined in:
- lib/logtail/integration.rb
Overview
An integration represent an integration for an entire library. For example, ‘Rack`. While the Logtail `Rack` integration is comprised of multiple middlewares, the `Logtail::Integrations::Rack` module is an entire integration that extends this module.
Instance Method Summary collapse
- 
  
    
      #enabled=(value)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Easily sisable entire library integrations. 
- 
  
    
      #enabled?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    Accessor method for #enabled=. 
- 
  
    
      #integrate!  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Abstract method that each integration must implement. 
- 
  
    
      #silence=(value)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Silences a library’s logs. 
- 
  
    
      #silence?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    Accessor method for #silence=. 
Instance Method Details
#enabled=(value) ⇒ Object
Easily sisable entire library integrations. This is like removing the code from Logtail. It will not touch this library and the library will function as it would without Logtail.
| 12 13 14 | # File 'lib/logtail/integration.rb', line 12 def enabled=(value) @enabled = value end | 
#enabled? ⇒ Boolean
Accessor method for #enabled=
| 17 18 19 | # File 'lib/logtail/integration.rb', line 17 def enabled? @enabled != false end | 
#integrate! ⇒ Object
Abstract method that each integration must implement.
| 36 37 38 | # File 'lib/logtail/integration.rb', line 36 def integrate! raise NotImplementedError.new end | 
#silence=(value) ⇒ Object
Silences a library’s logs. This ensures that logs are not generated at all from this library.
| 26 27 28 | # File 'lib/logtail/integration.rb', line 26 def silence=(value) @silence = value end | 
#silence? ⇒ Boolean
Accessor method for #silence=
| 31 32 33 | # File 'lib/logtail/integration.rb', line 31 def silence? @silence == true end |