Class: HttpLog::Configuration
- Inherits:
-
Object
- Object
- HttpLog::Configuration
- Defined in:
- lib/httplog/configuration.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#compact_log ⇒ Object
Returns the value of attribute compact_log.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#log_benchmark ⇒ Object
Returns the value of attribute log_benchmark.
-
#log_connect ⇒ Object
Returns the value of attribute log_connect.
-
#log_data ⇒ Object
Returns the value of attribute log_data.
-
#log_headers ⇒ Object
Returns the value of attribute log_headers.
-
#log_request ⇒ Object
Returns the value of attribute log_request.
-
#log_response ⇒ Object
Returns the value of attribute log_response.
-
#log_status ⇒ Object
Returns the value of attribute log_status.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#prefix_data_lines ⇒ Object
Returns the value of attribute prefix_data_lines.
-
#prefix_line_numbers ⇒ Object
Returns the value of attribute prefix_line_numbers.
-
#prefix_response_lines ⇒ Object
Returns the value of attribute prefix_response_lines.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#url_blacklist_pattern ⇒ Object
Returns the value of attribute url_blacklist_pattern.
-
#url_whitelist_pattern ⇒ Object
Returns the value of attribute url_whitelist_pattern.
Instance Method Summary collapse
-
#[]=(key, value) ⇒ Object
TODO: remove in 1.0.0.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/httplog/configuration.rb', line 24 def initialize @enabled = true @compact_log = false @logger = Logger.new($stdout) @severity = Logger::Severity::DEBUG @prefix = LOG_PREFIX @log_connect = true @log_request = true @log_headers = false @log_data = true @log_status = true @log_response = true @log_benchmark = true @url_whitelist_pattern = /.*/ @url_blacklist_pattern = nil @color = false @prefix_data_lines = false @prefix_response_lines = false @prefix_line_numbers = false end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def color @color end |
#compact_log ⇒ Object
Returns the value of attribute compact_log.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def compact_log @compact_log end |
#enabled ⇒ Object
Returns the value of attribute enabled.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def enabled @enabled end |
#log_benchmark ⇒ Object
Returns the value of attribute log_benchmark.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def log_benchmark @log_benchmark end |
#log_connect ⇒ Object
Returns the value of attribute log_connect.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def log_connect @log_connect end |
#log_data ⇒ Object
Returns the value of attribute log_data.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def log_data @log_data end |
#log_headers ⇒ Object
Returns the value of attribute log_headers.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def log_headers @log_headers end |
#log_request ⇒ Object
Returns the value of attribute log_request.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def log_request @log_request end |
#log_response ⇒ Object
Returns the value of attribute log_response.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def log_response @log_response end |
#log_status ⇒ Object
Returns the value of attribute log_status.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def log_status @log_status end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def logger @logger end |
#prefix ⇒ Object
Returns the value of attribute prefix.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def prefix @prefix end |
#prefix_data_lines ⇒ Object
Returns the value of attribute prefix_data_lines.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def prefix_data_lines @prefix_data_lines end |
#prefix_line_numbers ⇒ Object
Returns the value of attribute prefix_line_numbers.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def prefix_line_numbers @prefix_line_numbers end |
#prefix_response_lines ⇒ Object
Returns the value of attribute prefix_response_lines.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def prefix_response_lines @prefix_response_lines end |
#severity ⇒ Object
Returns the value of attribute severity.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def severity @severity end |
#url_blacklist_pattern ⇒ Object
Returns the value of attribute url_blacklist_pattern.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def url_blacklist_pattern @url_blacklist_pattern end |
#url_whitelist_pattern ⇒ Object
Returns the value of attribute url_whitelist_pattern.
5 6 7 |
# File 'lib/httplog/configuration.rb', line 5 def url_whitelist_pattern @url_whitelist_pattern end |
Instance Method Details
#[]=(key, value) ⇒ Object
TODO: remove in 1.0.0
46 47 48 49 |
# File 'lib/httplog/configuration.rb', line 46 def []=(key, value) warn 'DEPRECATION WARNING: Assignment to HttpLog.options will be removed in version 1.0.0. Please use HttpLog.configure block instead as described here: https://github.com/trusche/httplog#configuration' send("#{key}=", value) end |