Skip to content

Documentation - color example not working #60

@yoones

Description

@yoones

Gemfile.lock: httplog (1.1.0)

When I use the example in the README:

config.color = {color: :black, background: :yellow}

I get the following error:

HTTPLOG CONFIGURATION ERROR: {:color=>:black, :background=>:yellow} is not a valid color

Full initialization:

if Rails.env.development?
  require 'httplog'
  HttpLog.configure do |config|

    # Enable or disable all logging
    config.enabled = true

    # You can assign a different logger
    config.logger = Rails.logger

    # I really wouldn't change this...
    config.severity = Logger::Severity::DEBUG

    # Tweak which parts of the HTTP cycle to log...
    config.log_connect   = true
    config.log_request   = true
    config.log_headers   = false
    config.log_data      = true
    config.log_status    = true
    config.log_response  = true
    config.log_benchmark = true

    # ...or log all request as a single line by setting this to `true`
    config.compact_log = false

    # Prettify the output - see below
    config.color = false

    # Limit logging based on URL patterns
    config.url_whitelist_pattern = /.*/
    config.url_blacklist_pattern = nil
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions