Skip to content

Commit

Permalink
Revert "[Whitespace] Add extra logging to Whitespace call method"
Browse files Browse the repository at this point in the history
This reverts commit b914588.
  • Loading branch information
chrismytton committed May 14, 2024
1 parent 60155b1 commit b9e8f1e
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions perllib/Integrations/Whitespace.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ package Integrations::Whitespace;
use strict;
use warnings;
use Moo;
use JSON::MaybeXS qw(encode_json);

with 'Integrations::Roles::SOAP';
with 'Integrations::Roles::ParallelAPI';
with 'FixMyStreet::Roles::Syslog';

has attr => ( is => 'ro', default => 'http://webservices.whitespacews.com/' );
has username => ( is => 'ro' );
Expand All @@ -35,12 +33,7 @@ has endpoint => (
soapversion => 1.1,
proxy => $self->url,
default_ns => $self->attr,
on_action => sub { $self->attr . $_[1] },
on_fault => sub {
my ($soap, $res) = @_;
$self->log("[Whitespace] SOAP Fault: " . $res->method . ": " . $res->faultcode . " - " . $res->faultstring);
die $res->faultstring;
},
on_action => sub { $self->attr . $_[1] }
);
},
);
Expand All @@ -65,23 +58,9 @@ has security => (

has backend_type => ( is => 'ro', default => 'whitespace' );

has log_ident => (
is => 'ro',
default => sub {
my $feature = 'whitespace';
my $features = FixMyStreet->config('COBRAND_FEATURES');
return unless $features && ref $features eq 'HASH';
return unless $features->{$feature} && ref $features->{$feature} eq 'HASH';
my $f = $features->{$feature}->{_fallback};
return $f->{log_ident};
}
);

sub call {
my ($self, $method, @params) = @_;

$self->log("[Whitespace] $method : " . encode_json(\@params));

require SOAP::Lite;
@params = make_soap_structure(@params);
my $som = $self->endpoint->call(
Expand Down

0 comments on commit b9e8f1e

Please sign in to comment.