From aa286493cca2e4b1693f9d7d5fec87c16b85aa63 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 27 Apr 2010 20:27:16 +0000 Subject: [PATCH] -Add feature to use XCATXMLTRACE=1 to dump xml format of transactions git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5908 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Client.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index 84ac36735..b0c1823c9 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -156,6 +156,7 @@ $request->{clienttype}->[0] = "cli"; # setup clienttype for auditlog } } my $msg=XMLout($request,RootName=>'xcatrequest',NoAttr=>1,KeyAttr=>[]); + if ($ENV{XCATXMLTRACE}) { print $msg; } $SIG{TERM} = $SIG{INT} = sub { print $client XMLout({abortcommand=>1},RootName=>'xcatrequest',NoAttr=>1,KeyAttr=>[]); exit 0; }; print $client $msg; my $response; @@ -167,6 +168,7 @@ $request->{clienttype}->[0] = "cli"; # setup clienttype for auditlog #replace ESC with xxxxESCxxx because XMLin cannot handle it $response =~ s/\e/xxxxESCxxxx/g; + if ($ENV{XCATXMLTRACE}) { print $response; } $rsp = XMLin($response,SuppressEmpty=>undef,ForceArray=>1); #add ESC back