Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding silence to logger with middleware works with puma but not with tomcat9 #269

Open
jlahtinen opened this issue Dec 5, 2024 · 0 comments

Comments

@jlahtinen
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant