- Explicit dependencies for ruby 4.0
- Fix binary multipart body logging
- Modernize gemspec
- Introduced a new
Configurationclass forHttpLoggerto manage settings. - Added support for binary response detection and logging.
- Added a new spec for binary response handling.
- Updated
Gemfileto usegemspecinstead of listing development dependencies directly. - Refactored
HttpLoggerto use a configuration object for managing settings. - Updated
Readme.mdwith new configuration example usingHttpLogger.configure.
- Removed
Gemfile.lockfrom version control.
HttpLogger.configure do |c|
c.logger = Logger.new('/path/to/logfile.log')
c.colorize = true
c.ignore = [/example\.com/]
c.log_headers = true
c.log_request_body = true
c.log_response_body = true
c.level = :info
c.collapse_body_limit = 5000
endWhen a binary response is detected, the log will include a message indicating the binary content and its size:
Response body: <binary 41887 bytes>