logtail / logtail-ruby-rails

Better Stack Rails client
https://betterstack.com/logs
Other
12 stars 6 forks source link

Support TaggedLogging, avoid use of initializer file #14

Closed PetrHeinz closed 1 year ago

PetrHeinz commented 1 year ago

Wraps our logger in ActiveSupport::TaggedLogging by default.

Removes rake logtail:install.

Effectively reverts #11 as it broke installation process - after initialization, Rails.logger would contain instance of ActiveSupport::Logger. This PR recommends settings config.logger in config/application.rb to avoid inconsistencies with other logger gems.

Implemented Logtail::Logger.create_default_logger so that needed configuration is only a one-liner and we have some control over how Logger is instantiated by default (possibly to support other wrappers).

Tagged logging is supported in Rails 6.1 and higher

PetrHeinz commented 1 year ago

After merging, it needs: