2

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?

Logan Serman
  • 29,447
  • 27
  • 102
  • 141

2 Answers2

2

for me it was the order :/ the 'log' should come prior to 'logger'

  • config.log = true
  • config.logger = Rails.logger
Volkan
  • 48
  • 6
1

I figured out the solution to this problem on GitHub. The trick is to configure the variables directly within the Savon::Model client.

Logan Serman
  • 29,447
  • 27
  • 102
  • 141