Is there some way to disable all logging (whether from ActiveRecord, other parts of Rails, plugins, etc.) from a script running via script/runner
? I've got a long data-loading script running, and it's generating an absurd amount of useless logging information. I'm not trying to change script/runner
's environment (e.g., production, development, etc.)- the script currently needs to run in the "development" environment, and it's doing so without issue at the moment.
All I want to do is suppress all logging for the duration of the script's lifetime. From reading the docs, it looks like if I can get a handle to its Rails::Configuration
I should be either able to set log_level
to something other than :debug
or set its logger
to nil
. Am I on the right track? If so, how do I get access to its Rails::Configuration
object?