Class: HttpLog::HttpConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/influxdb/rails/httplog/http_configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHttpConfiguration

Returns a new instance of HttpConfiguration.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 29

def initialize
  @enabled               = true
  @compact_log           = false
  @json_log              = false
  @logger                = Logger.new($stdout)
  @logger_method         = :log
  @severity              = Logger::Severity::DEBUG
  @prefix                = LOG_PREFIX
  @log_connect           = true
  @http_request_tracking_id         = "al-txn-id"
  @http_request_tracking_measurement         = "rails.http_client"
  @log_request           = true
  @log_headers           = false
  @log_data              = true
  @log_status            = true
  @log_response          = true
  @log_benchmark         = true
  @url_whitelist_pattern = nil
  @url_blacklist_pattern = nil
  @color                 = false
  @prefix_data_lines     = false
  @prefix_response_lines = false
  @prefix_line_numbers   = false
  @filter_parameters     = []
end

Instance Attribute Details

#colorObject

Returns the value of attribute color.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def color
  @color
end

#compact_logObject

Returns the value of attribute compact_log.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def compact_log
  @compact_log
end

#enabledObject

Returns the value of attribute enabled.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def enabled
  @enabled
end

#filter_parametersObject

Returns the value of attribute filter_parameters.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def filter_parameters
  @filter_parameters
end

#http_request_tracking_idObject

Returns the value of attribute http_request_tracking_id.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def http_request_tracking_id
  @http_request_tracking_id
end

#http_request_tracking_measurementObject

Returns the value of attribute http_request_tracking_measurement.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def http_request_tracking_measurement
  @http_request_tracking_measurement
end

#json_logObject

Returns the value of attribute json_log.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def json_log
  @json_log
end

#log_benchmarkObject

Returns the value of attribute log_benchmark.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def log_benchmark
  @log_benchmark
end

#log_connectObject

Returns the value of attribute log_connect.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def log_connect
  @log_connect
end

#log_dataObject

Returns the value of attribute log_data.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def log_data
  @log_data
end

#log_headersObject

Returns the value of attribute log_headers.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def log_headers
  @log_headers
end

#log_requestObject

Returns the value of attribute log_request.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def log_request
  @log_request
end

#log_responseObject

Returns the value of attribute log_response.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def log_response
  @log_response
end

#log_statusObject

Returns the value of attribute log_status.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def log_status
  @log_status
end

#loggerObject

Returns the value of attribute logger.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def logger
  @logger
end

#logger_methodObject

Returns the value of attribute logger_method.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def logger_method
  @logger_method
end

#prefixObject

Returns the value of attribute prefix.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def prefix
  @prefix
end

#prefix_data_linesObject

Returns the value of attribute prefix_data_lines.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def prefix_data_lines
  @prefix_data_lines
end

#prefix_line_numbersObject

Returns the value of attribute prefix_line_numbers.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def prefix_line_numbers
  @prefix_line_numbers
end

#prefix_response_linesObject

Returns the value of attribute prefix_response_lines.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def prefix_response_lines
  @prefix_response_lines
end

#severityObject

Returns the value of attribute severity.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def severity
  @severity
end

#url_blacklist_patternObject

Returns the value of attribute url_blacklist_pattern.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def url_blacklist_pattern
  @url_blacklist_pattern
end

#url_whitelist_patternObject

Returns the value of attribute url_whitelist_pattern.



5
6
7
# File 'lib/influxdb/rails/httplog/http_configuration.rb', line 5

def url_whitelist_pattern
  @url_whitelist_pattern
end