LitleCo/litle-sdk-for-ruby — pull request #7 by pierre (2013-03-13 22:01:33+00:00)
Title: configuration: allow specification of an external logger

One can now specify an external logger for XML requests and responses
by setting the logger configuration property:

LitleOnline::Configuration.logger = Logger.new(STDOUT)

This is mainly useful for the Active Merchant integration.

The default behavior hasn't changed and the printxml config parameter is
still respected.

The implementation could be cleaner by making the logger an instance of
Configuration. This requires though that the LitleXmlMapper.request
signature changes and accepts an instance of Configuration instead of the
hash directly. I didn't implement this since I'm not sure if this API is public
and to avoid making intrusive changes in the test suite.

Signed-off-by: Pierre-Alexandre Meyer