bkeepers / dotenv

A Ruby gem to load environment variables from `.env`.
MIT License
6.6k stars 506 forks source link

Fix regression with semantic-logger, allow setting custom logger #494

Closed bkeepers closed 9 months ago

bkeepers commented 9 months ago

This partially reverts the change in #489 to go back to using ActiveSupport::TaggedLogging instead of calling #tagged on an existing logger. However, now you can configure dotenv to use your own logger and it won't set up its own:

# config/application.rb

# Set a custom dotenv logger
Dotenv::Rails.logger = MyCustomLogger.new

module YourApp
  class Application < Rails::Application
    # …
  end
end

Fixes #493 cc @brosintoski @kriansa @alisaifee