diff --git a/fhem/FHEM/98_configdb.pm b/fhem/FHEM/98_configdb.pm index adbcd77f6..18561ce85 100644 --- a/fhem/FHEM/98_configdb.pm +++ b/fhem/FHEM/98_configdb.pm @@ -185,6 +185,7 @@ sub CommandConfigdb { when ('migrate') { return "\n Migration not possible. Already running with configDB!" if $configfile eq 'configDB'; + $data{cfgDB_debug} = 1 if (lc($param1) eq 'debug'); Log3('configdb', 4, "configdb: migration requested."); $ret = _cfgDB_Migrate; } diff --git a/fhem/configDB.pm b/fhem/configDB.pm index 61887fc87..1d7b8c25b 100644 --- a/fhem/configDB.pm +++ b/fhem/configDB.pm @@ -525,6 +525,7 @@ sub cfgDB_SaveCfg { ## prototype used in fhem.pl $t = localtime; $out = "#created $t"; push @rowList, $out; + Debug "\n".join("\n",@rowList) if defined($data{cfgDB_debug}); return @rowList if defined($data{cfgDB_rawList}); # Insert @rowList into database table @@ -751,6 +752,7 @@ sub _cfgDB_Connect { # add configuration entry into fhemconfig sub _cfgDB_InsertLine { my ($fhem_dbh, $uuid, $line, $counter) = @_; + Log 0, "configDB: $line" if defined($data{cfgDB_debug}); my ($c,$d,$p1,$p2) = split(/ /, $line, 4); my $sth = $fhem_dbh->prepare('INSERT INTO fhemconfig values (?, ?, ?, ?, ?, ?)'); $sth->execute($c, $d, $p1, $p2, $counter, $uuid);