reidmorrison/rails_semantic_logger

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

juna-nb opened this issue · 1 comments

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.

This issue is probably related: #220