diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb index 7c0738c04d9..2077ff94a0e 100644 --- a/lib/plugin/instance.rb +++ b/lib/plugin/instance.rb @@ -591,7 +591,13 @@ JS DiscoursePluginRegistry.register_locale(locale, opts) Rails.configuration.assets.precompile << "locales/#{locale}.js" else - Rails.logger.error "Invalid locale! #{opts.inspect}" + msg = "Invalid locale! #{opts.inspect}" + # The logger isn't always present during boot / parsing locales from plugins + if Rails.logger.present? + Rails.logger.error(msg) + else + puts msg + end end end end