Skip to content

undefined method keys' + undefined method clear_tags!' #48

Description

@delphaber

Hi,

I'm using grape inside Rails. When using Rails.logger as logger and GrapeLogging::Formatters::Default as formatter, I receive these exceptions ( complete backtrace ) when grape tries to log the request.

This is my configuration:

module Foobar
  class Api < Grape::API
    logger Rails.logger

    use GrapeLogging::Middleware::RequestLogger,
      logger: logger,
      formatter: GrapeLogging::Formatters::Default.new,
      include: [ GrapeLogging::Loggers::Response.new,
                 GrapeLogging::Loggers::FilterParameters.new,
                 GrapeLogging::Loggers::ClientEnv.new,
                 GrapeLogging::Loggers::RequestHeaders.new ]

I noticed that if I change logger Rails.logger with logger Rails.logger.dup it works, without any exception. Why?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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