ankane/logstop

How to install in Rails 7?

Duartemartins opened this issue · 1 comments

Hello,

I'm having some trouble with my Logstop configuration. Here's the configuration I'm trying to use, in development.rb:

if ENV['RAILS_LOG_TO_STDOUT'].present? logger = ActiveSupport::Logger.new(STDOUT) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) Logstop.guard(config.logger) end

However, I'm encountering issues with this setup, the PII in Rails console is not being obfuscated. Could you provide some guidance on how to properly install and configure Logstop in a Rails 7 application? Any help or pointers to relevant documentation would be greatly appreciated.

Thank you!

ankane commented

Hi @Duartemartins, you'll want to place it in an initializer. https://github.com/ankane/logstop#rails