- Modernize gemspec
- Introduced a new
Configuration
class forHttpLogger
to manage settings. - Added support for binary response detection and logging.
- Added a new spec for binary response handling.
- Updated
Gemfile
to usegemspec
instead of listing development dependencies directly. - Refactored
HttpLogger
to use a configuration object for managing settings. - Updated
Readme.md
with new configuration example usingHttpLogger.configure
.
- Removed
Gemfile.lock
from 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
end
When a binary response is detected, the log will include a message indicating the binary content and its size:
Response body: <binary 41887 bytes>