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

Exception: NoMethodError: undefined method `tags' for an instance of Logger #210

Open
juna-nb opened this issue Feb 20, 2024 · 1 comment

Comments

@juna-nb
Copy link

juna-nb commented Feb 20, 2024

Environment

Provide at least:

  • Ruby Version: 3.3.0
  • Rails Version: 7.1.3
  • Semantic Logger Version: 4.15 and master
  • Rails Semantic Logger Version: 4.14.0 and master
  • Other Application/framework names and versions (e.g. Puma, etc.): Using Puma 6.4.2

Development server logs:

Rails -- Exception: NoMethodError: undefined method `tags' for an instance of Logger
~/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/bundler/gems/rails_semantic_logger-93fed9edd0ba/lib/rails_semantic_logger/extensions/action_cable/tagged_logger_proxy.rb:7:in `tag'
~/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/actioncable-7.1.3/lib/action_cable/connection/tagged_logger_proxy.rb:40:in `log'
~/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/actioncable-7.1.3/lib/action_cable/connection/tagged_logger_proxy.rb:34:in `block (2 levels) in <class:TaggedLoggerProxy>'
~/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/actioncable-7.1.3/lib/action_cable/connection/base.rb:75:in `process'
~/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/actioncable-7.1.3/lib/action_cable/server/base.rb:36:in `call'
~/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/actionpack-7.1.3/lib/action_dispatch/routing/mapper.rb:22:in `block in <class:Constraints>'

Browser console error as a result:

WebSocket connection to 'ws://localhost:3000/cable' failed: 

Behavior

On a Rails 7 app with a fresh install of StimulusReflex the example page it generates works when rails_semantic_logger is not installed but gives the above error and doesn't work when rails_semantic_logger is installed. Both the latest version of rails_semantic_logger and today's master brach cause the error.

@reidmorrison
Copy link
Owner

This issue is probably related: #220

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

2 participants