8000 Adding silence to logger with middleware works with puma but not with tomcat9 · Issue #269 · jruby/jruby-rack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Adding silence to logger with middleware works with puma but not with tomcat9 #269
Open
@jlahtinen

Description

@jlahtinen

My middleware is basically

      def call(env)
        engine_mount_path = Foo::Engine.routes.find_script_name({})
        env_path_info = env['PATH_INFO']
        under_engine_mount_path = env_path_info.start_with?(engine_mount_path)
        under_and_status = under_engine_mount_path && env['PATH_INFO'].end_with?('/status')
        under_and_status ? Rails.logger.silence { @app.call(env) } : @app.call(env)
      end

I tried to understand what was going on and I was able to silence logger.info with master...jlahtinen:jruby-rack:rails-logger

But I didn't have courage to make a pull request or continue with that way. Any ideas how this problem should be tackled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0