Skip to content

Instantly share code, notes, and snippets.

@alecslupu
Created May 10, 2022 03:48
Show Gist options
  • Save alecslupu/b4fd313aefcc8c6dd4dbed62f3aa3822 to your computer and use it in GitHub Desktop.
Save alecslupu/b4fd313aefcc8c6dd4dbed62f3aa3822 to your computer and use it in GitHub Desktop.
rails I18n logger
module I18n
module Registry
protected
def lookup(locale, key, scope = [], options = {})
@log ||= Logger.new(File.join(Rails.root, 'log', 'i18n_registry.log'))
@log.info key
super
end
end
end
I18n::Backend::Simple.send :include, I18n::Registry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment