Class: HttpLog::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/httplog/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



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

def initialize
  @enabled                 = true
  @compact_log             = false
  @json_log                = false
  @graylog_formatter       = nil
  @logger                  = Logger.new($stdout)
  @logger_method           = :log
  @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   = nil
  @url_blacklist_pattern   = nil
  @url_masked_body_pattern = nil
  @color                   = false
  @prefix_data_lines       = false
  @prefix_response_lines   = false
  @prefix_line_numbers     = false
  @json_parser             = nil
  @filter_parameters       = %w[password]
end

Instance Attribute Details

#colorObject

Returns the value of attribute color.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def color
  @color
end

#compact_logObject

Returns the value of attribute compact_log.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def compact_log
  @compact_log
end

#enabledObject

Returns the value of attribute enabled.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def enabled
  @enabled
end

#filter_parametersObject

Returns the value of attribute filter_parameters.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def filter_parameters
  @filter_parameters
end

#graylog_formatterObject

Returns the value of attribute graylog_formatter.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def graylog_formatter
  @graylog_formatter
end

#json_logObject

Returns the value of attribute json_log.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def json_log
  @json_log
end

#json_parserObject

Returns the value of attribute json_parser.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def json_parser
  @json_parser
end

#log_benchmarkObject

Returns the value of attribute log_benchmark.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def log_benchmark
  @log_benchmark
end

#log_connectObject

Returns the value of attribute log_connect.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def log_connect
  @log_connect
end

#log_dataObject

Returns the value of attribute log_data.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def log_data
  @log_data
end

#log_headersObject

Returns the value of attribute log_headers.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def log_headers
  @log_headers
end

#log_requestObject

Returns the value of attribute log_request.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def log_request
  @log_request
end

#log_responseObject

Returns the value of attribute log_response.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def log_response
  @log_response
end

#log_statusObject

Returns the value of attribute log_status.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def log_status
  @log_status
end

#loggerObject

Returns the value of attribute logger.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def logger
  @logger
end

#logger_methodObject

Returns the value of attribute logger_method.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def logger_method
  @logger_method
end

#prefixObject

Returns the value of attribute prefix.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def prefix
  @prefix
end

#prefix_data_linesObject

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_numbersObject

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_linesObject

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

#severityObject

Returns the value of attribute severity.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def severity
  @severity
end

#url_blacklist_patternObject

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_masked_body_patternObject

Returns the value of attribute url_masked_body_pattern.



5
6
7
# File 'lib/httplog/configuration.rb', line 5

def url_masked_body_pattern
  @url_masked_body_pattern
end

#url_whitelist_patternObject

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