Class: HttpLogger::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
# File 'lib/http_logger/configuration.rb', line 12

def initialize
  reset
end

Instance Attribute Details

#collapse_body_limitObject

Returns the value of attribute collapse_body_limit.



3
4
5
# File 'lib/http_logger/configuration.rb', line 3

def collapse_body_limit
  @collapse_body_limit
end

#colorizeObject

Returns the value of attribute colorize.



8
9
10
# File 'lib/http_logger/configuration.rb', line 8

def colorize
  @colorize
end

#ignoreObject

Returns the value of attribute ignore.



9
10
11
# File 'lib/http_logger/configuration.rb', line 9

def ignore
  @ignore
end

#levelObject

Returns the value of attribute level.



10
11
12
# File 'lib/http_logger/configuration.rb', line 10

def level
  @level
end

#log_headersObject

Returns the value of attribute log_headers.



4
5
6
# File 'lib/http_logger/configuration.rb', line 4

def log_headers
  @log_headers
end

#log_request_bodyObject

Returns the value of attribute log_request_body.



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

def log_request_body
  @log_request_body
end

#log_response_bodyObject

Returns the value of attribute log_response_body.



6
7
8
# File 'lib/http_logger/configuration.rb', line 6

def log_response_body
  @log_response_body
end

#loggerObject

Returns the value of attribute logger.



7
8
9
# File 'lib/http_logger/configuration.rb', line 7

def logger
  @logger
end

Instance Method Details

#resetObject



16
17
18
19
20
21
22
23
24
# File 'lib/http_logger/configuration.rb', line 16

def reset
  self.log_headers = false
  self.log_request_body = true
  self.log_response_body = true
  self.colorize = true
  self.collapse_body_limit = 5000
  self.ignore = []
  self.level = :debug
end