use SOAP::Lite +trace => [ fault => \&log_faults ]; sub log_faults { open LOGFILE, ">soap_trace.txt"; print LOGFILE $_[0] . "\n"; close LOGFILE; }