Open
Description
Logging early in the Rails startup sequence (e.g. in application.rb
or in one of the files under config/environments
) can fail due to the logger not being initialized. In this situation the workaround is to wrap the call to the logger in a config.after_initialize
block:
config.after_initialize do
Rails.logger.info('msg', obj)
end
It would be nice to have a convenience object or set of convenience methods that would DRY this and keep the complexity out of the config/initialization files.
Metadata
Metadata
Assignees
Labels
No labels