I have all three environments (test, development, production) displaying log output at the :info level, through config.log_level = :info
in their respective .rb files.
When I start my local Rails server with rails s
, Savon output appears in the console when there are requests which is what I expect. But this output is not logged to the actual development.log
file. The same thing occurs on a production environment, which is where I'd really like to see Savon's output.
I have this block in my application.rb:
Savon.configure do |config|
config.env_namespace = :soapenv
config.log = true
config.logger = Rails.logger
config.log_level = :info
config.pretty_print_xml = true
end
Which does configure whether or not I can see the logging in the console. But how do I actual write it to *.log?
I figured out the solution to this problem on GitHub. The trick is to configure the variables directly within the Savon::Model client.