Class: Loga::Configuration
- Inherits:
-
Object
- Object
- Loga::Configuration
- Defined in:
- lib/loga/configuration.rb
Instance Attribute Summary collapse
-
#device ⇒ Object
Returns the value of attribute device.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#filter_parameters ⇒ Object
Returns the value of attribute filter_parameters.
-
#host ⇒ Object
Returns the value of attribute host.
-
#level ⇒ Object
Returns the value of attribute level.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#service_name ⇒ Object
Returns the value of attribute service_name.
-
#service_version ⇒ Object
Returns the value of attribute service_version.
-
#silence_rails_rack_logger ⇒ Object
Returns the value of attribute silence_rails_rack_logger.
-
#sync ⇒ Object
Returns the value of attribute sync.
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #initialize! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/loga/configuration.rb', line 18 def initialize @host = gethostname @device = nil @sync = true @level = :info @filter_parameters = [] @service_version = :git # Rails specific configuration @enabled = true @silence_rails_rack_logger = true end |
Instance Attribute Details
#device ⇒ Object
Returns the value of attribute device.
6 7 8 |
# File 'lib/loga/configuration.rb', line 6 def device @device end |
#enabled ⇒ Object
Returns the value of attribute enabled.
6 7 8 |
# File 'lib/loga/configuration.rb', line 6 def enabled @enabled end |
#filter_parameters ⇒ Object
Returns the value of attribute filter_parameters.
6 7 8 |
# File 'lib/loga/configuration.rb', line 6 def filter_parameters @filter_parameters end |
#host ⇒ Object
Returns the value of attribute host.
6 7 8 |
# File 'lib/loga/configuration.rb', line 6 def host @host end |
#level ⇒ Object
Returns the value of attribute level.
6 7 8 |
# File 'lib/loga/configuration.rb', line 6 def level @level end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
16 17 18 |
# File 'lib/loga/configuration.rb', line 16 def logger @logger end |
#service_name ⇒ Object
Returns the value of attribute service_name.
6 7 8 |
# File 'lib/loga/configuration.rb', line 6 def service_name @service_name end |
#service_version ⇒ Object
Returns the value of attribute service_version.
6 7 8 |
# File 'lib/loga/configuration.rb', line 6 def service_version @service_version end |
#silence_rails_rack_logger ⇒ Object
Returns the value of attribute silence_rails_rack_logger.
6 7 8 |
# File 'lib/loga/configuration.rb', line 6 def silence_rails_rack_logger @silence_rails_rack_logger end |
#sync ⇒ Object
Returns the value of attribute sync.
6 7 8 |
# File 'lib/loga/configuration.rb', line 6 def sync @sync end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
38 39 40 |
# File 'lib/loga/configuration.rb', line 38 def configure yield self end |
#initialize! ⇒ Object
31 32 33 34 35 36 |
# File 'lib/loga/configuration.rb', line 31 def initialize! @service_name = service_name.to_s.strip @service_version = compute_service_version initialize_logger end |