Created
May 10, 2022 03:48
-
-
Save alecslupu/b4fd313aefcc8c6dd4dbed62f3aa3822 to your computer and use it in GitHub Desktop.
rails I18n logger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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