diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2015-04-24 14:43:25 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:23 +0100 |
commit | ef096dbe0fb71a00aaa23b69f7077ea999ae7116 (patch) | |
tree | 6138eb39e557970accc6e0d3f2a0cd92cba93df2 /perllib/FixMyStreet/Geocode | |
parent | b00679b290fe7e326a8f9960e33db43b78490bde (diff) |
Improvements to bin/geocode
- Fix behaviour of ALLOWED_COBRANDS checking
- ... inferring cobrand if only one is allowed
- new --use-cache option (defaulting to false)
- better diagnostics
- Can be manually uncommented and tested against bin/geocode
script.
See mysociety/FixMyStreet-Commercial#710
Diffstat (limited to 'perllib/FixMyStreet/Geocode')
-rw-r--r-- | perllib/FixMyStreet/Geocode/Zurich.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Geocode/Zurich.pm b/perllib/FixMyStreet/Geocode/Zurich.pm index aad918b0e..50a7c355e 100644 --- a/perllib/FixMyStreet/Geocode/Zurich.pm +++ b/perllib/FixMyStreet/Geocode/Zurich.pm @@ -31,6 +31,7 @@ sub setup_soap { my $action = "$attr/IFixMyZuerich/"; require SOAP::Lite; + # SOAP::Lite->import( +trace => [transport => \&log_message ] ); # Set up the SOAP handler $security = SOAP::Header->name("Security")->attr({ @@ -109,5 +110,15 @@ sub string { return { error => $error }; } +sub log_message { + my ($in) = @_; + eval { + printf "log_message [$in]: %s\n\n", $in->content; # ...for example + }; + if ($@) { + print "log_message [$in]: ???? \n\n"; + } +} + 1; |