mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-28 02:44:53 +00:00
93_DbLog: logfile entry if DBI module not installed, Forum: #109382
git-svn-id: https://svn.fhem.de/fhem/trunk@21483 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b4ee811f32
commit
513441e641
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- change: 93_DbLog: logfile entry if DBI module not installed, Forum: #109382
|
||||||
- bugfix: 70_BOTVAC: handle some initial values
|
- bugfix: 70_BOTVAC: handle some initial values
|
||||||
- feature: 31_HUEDevice: added batteryPercent reading
|
- feature: 31_HUEDevice: added batteryPercent reading
|
||||||
battery reading is deprecated, will be removed later
|
battery reading is deprecated, will be removed later
|
||||||
|
@ -30,6 +30,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
|||||||
|
|
||||||
# Version History intern by DS_Starter:
|
# Version History intern by DS_Starter:
|
||||||
our %DbLog_vNotesIntern = (
|
our %DbLog_vNotesIntern = (
|
||||||
|
"4.9.11" => "22.03.2020 logfile entry if DBI module not installed, Forum: #109382 ",
|
||||||
"4.9.10" => "31.01.2020 fix warning, Forum: #107950 ",
|
"4.9.10" => "31.01.2020 fix warning, Forum: #107950 ",
|
||||||
"4.9.9" => "21.01.2020 default ParseEvent changed again, Forum: #106769 ",
|
"4.9.9" => "21.01.2020 default ParseEvent changed again, Forum: #106769 ",
|
||||||
"4.9.8" => "17.01.2020 adjust configCheck with plotEmbed check. Forum: #107383 ",
|
"4.9.8" => "17.01.2020 adjust configCheck with plotEmbed check. Forum: #107383 ",
|
||||||
@ -303,15 +304,17 @@ return;
|
|||||||
###############################################################
|
###############################################################
|
||||||
sub DbLog_Define($@) {
|
sub DbLog_Define($@) {
|
||||||
my ($hash, $def) = @_;
|
my ($hash, $def) = @_;
|
||||||
|
my $name = $hash->{NAME};
|
||||||
my @a = split("[ \t][ \t]*", $def);
|
my @a = split("[ \t][ \t]*", $def);
|
||||||
|
|
||||||
return "Error: Perl module ".$DbLogMMDBI." is missing.
|
if($DbLogMMDBI) {
|
||||||
Install it on Debian with: sudo apt-get install libdbi-perl" if($DbLogMMDBI);
|
Log3($name, 1, "DbLog $name - ERROR - Perl module ".$DbLogMMDBI." is missing. DbLog module is not loaded ! On Debian systems you can install it with \"sudo apt-get install libdbi-perl\" ");
|
||||||
|
return "Error: Perl module ".$DbLogMMDBI." is missing. Install it on Debian with: sudo apt-get install libdbi-perl";
|
||||||
|
}
|
||||||
|
|
||||||
return "wrong syntax: define <name> DbLog configuration regexp"
|
return "wrong syntax: define <name> DbLog configuration regexp"
|
||||||
if(int(@a) != 4);
|
if(int(@a) != 4);
|
||||||
|
|
||||||
my $name = $hash->{NAME};
|
|
||||||
$hash->{CONFIGURATION} = $a[2];
|
$hash->{CONFIGURATION} = $a[2];
|
||||||
my $regexp = $a[3];
|
my $regexp = $a[3];
|
||||||
|
|
||||||
@ -341,7 +344,7 @@ sub DbLog_Define($@) {
|
|||||||
my $ret = DbLog_readCfg($hash);
|
my $ret = DbLog_readCfg($hash);
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
# return on error while reading configuration
|
# return on error while reading configuration
|
||||||
Log3($hash->{NAME}, 1, "DbLog $hash->{NAME} - Error while reading $hash->{CONFIGURATION}: '$ret' ");
|
Log3($name, 1, "DbLog $name - Error while reading $hash->{CONFIGURATION}: '$ret' ");
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user