in reply to Re^2: Net::FTP not catching errors, my fault?
in thread [solved] Net::FTP not catching errors, my fault?
As you print the same log info each time, you could try something like the following, which avoids the constant line-noise log writing.
if ($ftp->login($data->{'login'}, $data->{'pw'}) and $ftp->binary and $ftp->cwd($data->{'remote_dir'}) and $ftp->put($to_upload) and $ftp->quit) { return 1; } else { $log->logwarn("upload_file: xqe $data->{'id'}, ", $ftp->message) $log->error("upload_file: xqe $data->{'id'}, " . "upload failed fo +r $to_upload"); return undef; }
|
|---|