2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

added: some more logging in Loglevel 4 for debugging

git-svn-id: https://svn.fhem.de/fhem/trunk@5045 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2014-02-25 13:58:24 +00:00
parent ba3854b030
commit 9bc77a5e96

View File

@ -781,12 +781,14 @@ sub retrieveFile($$;$$$){
Timeout => 10,
FirewallType => $proxyType,
Firewall => $proxyName);
Log3($name, 4, "GDS $name: ftp connection established.");
if(defined($ftp)){
$ftp->login($user, $pass);
$ftp->cwd("$dir");
@files = undef;
@files = $ftp->ls($dwd);
if(@files){
Log3($name, 4, "GDS $name: filelist found.");
@files = sort(@files);
$dataFile = $files[-1];
$urlString .= $dataFile;
@ -800,10 +802,12 @@ sub retrieveFile($$;$$$){
}
$found = 1;
} else {
Log3($name, 4, "GDS $name: filelist not found.");
$found = 0;
}
$ftp->quit;
}
Log3($name, 4, "GDS $name: updating readings.");
readingsBeginUpdate($hash);
readingsBulkUpdate($hash, "_dataSource", "Quelle: Deutscher Wetterdienst");
readingsBulkUpdate($hash, "_dF_".$request, $dataFile) if(AttrVal($name, "gdsDebug", 0));