Class: Syslogstash::Config
- Inherits:
-
Object
- Object
- Syslogstash::Config
- Defined in:
- lib/syslogstash/config.rb
Defined Under Namespace
Classes: ConfigurationError, InvalidEnvironmentError
Instance Attribute Summary collapse
-
#add_fields ⇒ Object
readonly
Returns the value of attribute add_fields.
-
#backlog_size ⇒ Object
readonly
Returns the value of attribute backlog_size.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#logstash_server ⇒ Object
readonly
Returns the value of attribute logstash_server.
-
#relay_sockets ⇒ Object
readonly
Returns the value of attribute relay_sockets.
-
#relay_to_stdout ⇒ Object
Returns the value of attribute relay_to_stdout.
-
#stats_server ⇒ Object
readonly
Returns the value of attribute stats_server.
-
#syslog_socket ⇒ Object
readonly
Returns the value of attribute syslog_socket.
Instance Method Summary collapse
-
#initialize(env, logger:) ⇒ Config
constructor
Create a new syslogstash config based on environment variables.
Constructor Details
#initialize(env, logger:) ⇒ Config
Create a new syslogstash config based on environment variables.
Examines the environment passed in, and then creates a new config object if all is well.
33 34 35 36 37 |
# File 'lib/syslogstash/config.rb', line 33 def initialize(env, logger:) @logger = logger parse_env(env) end |
Instance Attribute Details
#add_fields ⇒ Object (readonly)
Returns the value of attribute add_fields.
9 10 11 |
# File 'lib/syslogstash/config.rb', line 9 def add_fields @add_fields end |
#backlog_size ⇒ Object (readonly)
Returns the value of attribute backlog_size.
9 10 11 |
# File 'lib/syslogstash/config.rb', line 9 def backlog_size @backlog_size end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
16 17 18 |
# File 'lib/syslogstash/config.rb', line 16 def logger @logger end |
#logstash_server ⇒ Object (readonly)
Returns the value of attribute logstash_server.
9 10 11 |
# File 'lib/syslogstash/config.rb', line 9 def logstash_server @logstash_server end |
#relay_sockets ⇒ Object (readonly)
Returns the value of attribute relay_sockets.
9 10 11 |
# File 'lib/syslogstash/config.rb', line 9 def relay_sockets @relay_sockets end |
#relay_to_stdout ⇒ Object
Returns the value of attribute relay_to_stdout.
18 19 20 |
# File 'lib/syslogstash/config.rb', line 18 def relay_to_stdout @relay_to_stdout end |
#stats_server ⇒ Object (readonly)
Returns the value of attribute stats_server.
9 10 11 |
# File 'lib/syslogstash/config.rb', line 9 def stats_server @stats_server end |
#syslog_socket ⇒ Object (readonly)
Returns the value of attribute syslog_socket.
9 10 11 |
# File 'lib/syslogstash/config.rb', line 9 def syslog_socket @syslog_socket end |