diff --git a/fhem/FHEM/00_CUL.pm b/fhem/FHEM/00_CUL.pm
index 4e6e53110..feeaab56e 100755
--- a/fhem/FHEM/00_CUL.pm
+++ b/fhem/FHEM/00_CUL.pm
@@ -101,10 +101,9 @@ CUL_Initialize($)
$hash->{SetFn} = "CUL_Set";
$hash->{AttrFn} = "CUL_Attr";
$hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 " .
- "showtime:1,0 model:CUL,CUN,CUR loglevel:0,1,2,3,4,5,6 " .
- "sendpool addvaltrigger " .
- "rfmode:SlowRF,HomeMatic,MAX hmId ".
- "hmProtocolEvents:0_off,1_dump,2_dumpFull,3_dumpTrigger";
+ "showtime:1,0 model:CUL,CUN,CUR " .
+ "sendpool addvaltrigger rfmode:SlowRF,HomeMatic,MAX hmId ".
+ "hmProtocolEvents:0_off,1_dump,2_dumpFull,3_dumpTrigger";
$hash->{ShutdownFn} = "CUL_Shutdown";
@@ -131,7 +130,7 @@ CUL_Define($$)
if(@a < 4 || @a > 5) {
my $msg = "wrong syntax: define
If using more than one CUL/CUN for covering a large area, sending
diff --git a/fhem/FHEM/00_FBAHA.pm b/fhem/FHEM/00_FBAHA.pm
index 91a99675c..72c2d146c 100755
--- a/fhem/FHEM/00_FBAHA.pm
+++ b/fhem/FHEM/00_FBAHA.pm
@@ -33,7 +33,7 @@ FBAHA_Initialize($)
$hash->{DefFn} = "FBAHA_Define";
$hash->{GetFn} = "FBAHA_Get";
$hash->{SetFn} = "FBAHA_Set";
- $hash->{AttrList}= "dummy:1,0 loglevel:0,1,2,3,4,5,6 ";
+ $hash->{AttrList}= "dummy:1,0";
}
@@ -83,7 +83,7 @@ FBAHA_Set($@)
my ($i,$p) = ($1,$2,$3);
my $msg = "UNDEFINED FBDECT_$i FBDECT $i $p";
DoTrigger("global", $msg, 1);
- Log 3, "$msg, please define it";
+ Log3 $name, 3, "$msg, please define it";
}
}
}
@@ -94,7 +94,7 @@ FBAHA_Set($@)
FBAHA_Write($hash, "00", "00010001"); # REGISTER
my ($err, $data) = FBAHA_ReadAnswer($hash, "REGISTER", "^01");
if($err) {
- Log 1, $err;
+ Log3 $name, 1, $err;
$hash->{STATE} = "???";
return $err;
}
@@ -102,11 +102,12 @@ FBAHA_Set($@)
if($data =~ m/^01030010(........)/) {
$hash->{STATE} = "Initialized";
$hash->{HANDLE} = $1;
- Log 1, "FBAHA $hash->{NAME} registered with handle: $hash->{HANDLE}";
+ Log3 $name, 1,
+ "FBAHA $hash->{NAME} registered with handle: $hash->{HANDLE}";
} else {
my $msg = "Got bogus answer for REGISTER request: $data";
- Log 1, $msg;
+ Log3 $name, 1, $msg;
$hash->{STATE} = "???";
return $msg;
@@ -246,7 +247,6 @@ FBAHA_Read($@)
return "" if(!defined($buf));
my $name = $hash->{NAME};
- my $ll5 = GetLogLevel($name,5);
$buf = unpack('H*', $buf);
my $data = ($hash->{PARTIAL} ? $hash->{PARTIAL} : "");
@@ -257,14 +257,14 @@ FBAHA_Read($@)
delete($hash->{READ_TS});
}
- Log $ll5, "FBAHA/RAW: $data/$buf";
+ Log3 $name, 5, "FBAHA/RAW: $data/$buf";
$data .= $buf;
my $msg;
while(length($data) >= 16) {
my $len = hex(substr($data, 4,4))*2;
if($len < 16 || $len > 10240) { # Out of Sync
- Log 1, "FBAHA: resetting buffer as we are out of sync ($len)";
+ Log3 $name, 1, "FBAHA: resetting buffer as we are out of sync ($len)";
$hash->{PARTIAL} = "";
return "";
}
@@ -393,7 +393,6 @@ FBAHA_Ready($)
Attributes
@@ -477,7 +476,6 @@ FBAHA_Ready($)
Attributes
diff --git a/fhem/FHEM/00_FHZ.pm b/fhem/FHEM/00_FHZ.pm
index cadb7244a..ff54363b3 100755
--- a/fhem/FHEM/00_FHZ.pm
+++ b/fhem/FHEM/00_FHZ.pm
@@ -105,7 +105,7 @@ FHZ_Initialize($)
$hash->{GetFn} = "FHZ_Get";
$hash->{SetFn} = "FHZ_Set";
$hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 " .
- "showtime:1,0 model:fhz1000,fhz1300 loglevel:0,1,2,3,4,5,6 ".
+ "showtime:1,0 model:fhz1000,fhz1300 ".
"fhtsoftbuffer:1,0 addvaltrigger";
}
@@ -140,7 +140,7 @@ FHZ_Ready($)
}
return undef if(!$po);
- Log 1, "USB device $dev reappeared";
+ Log3 $name, 1, "USB device $dev reappeared";
$hash->{PortObj} = $po;
if($^O !~ m/Win/) {
$hash->{FD} = $po->FILENO;
@@ -178,7 +178,7 @@ FHZ_Set($@)
my $v = join(" ", @a);
my $name = $hash->{NAME};
- Log GetLogLevel($name,2), "FHZ set $v";
+ Log3 $name, 2, "FHZ set $v";
if($a[1] eq "initfull") {
@@ -244,13 +244,13 @@ FHZ_Get($@)
my $v = join(" ", @a);
my $name = $hash->{NAME};
- Log GetLogLevel($name,2), "FHZ get $v";
+ Log3 $name, 2, "FHZ get $v";
FHZ_ReadAnswer($hash, "Flush", 0);
FHZ_Write($hash, $fn, $arg) if(!IsDummy($hash->{NAME}));
my $msg = FHZ_ReadAnswer($hash, $a[1], 1.0);
- Log 5, "GET Got: $msg" if(defined($msg));
+ Log3 $name, 5, "GET Got: $msg" if(defined($msg));
return $msg if(!$msg || $msg !~ /^81..c9..0102/);
if($a[1] eq "serial") {
@@ -348,14 +348,14 @@ FHZ_Define($$)
$attr{$name}{fhtsoftbuffer} = 0;
if($dev eq "none") {
- Log 1, "FHZ device is none, commands will be echoed only";
+ Log3 $name, 1, "FHZ device is none, commands will be echoed only";
$attr{$name}{dummy} = 1;
return undef;
}
$hash->{DeviceName} = $dev;
$hash->{PARTIAL} = "";
- Log 3, "FHZ opening FHZ device $dev";
+ Log3 $name, 3, "FHZ opening FHZ device $dev";
if($^O =~ m/Win/) {
require Win32::SerialPort;
$po = new Win32::SerialPort ($dev);
@@ -365,12 +365,12 @@ FHZ_Define($$)
}
if(!$po) {
my $msg = "Can't open $dev: $!";
- Log(3, $msg) if($hash->{MOBILE});
+ Log3($name, 3, $msg) if($hash->{MOBILE});
return $msg if(!$hash->{MOBILE});
$readyfnlist{"$name.$dev"} = $hash;
return "";
}
- Log 3, "FHZ opened FHZ device $dev";
+ Log3 $name, 3, "FHZ opened FHZ device $dev";
$hash->{PortObj} = $po;
if($^O !~ m/Win/) {
@@ -397,7 +397,7 @@ FHZ_Undef($$)
$defs{$d}{IODev} == $hash)
{
my $lev = ($reread_active ? 4 : 2);
- Log GetLogLevel($name,$lev), "deleting port for $d";
+ Log3 $name, $lev, "deleting port for $d";
delete $defs{$d}{IODev};
}
}
@@ -426,7 +426,7 @@ FHZ_Parse($$)
}
if(!$type) {
- Log 4, "FHZ $name unknown: $omsg";
+ Log3 $name, 4, "FHZ $name unknown: $omsg";
$hash->{CHANGED}[0] = "$msg";
return $hash->{NAME};
}
@@ -436,7 +436,7 @@ FHZ_Parse($$)
$msg = substr($msg, 4, 2);
}
- Log 4, "FHZ $name $type: $msg";
+ Log3 $name, 4, "FHZ $name $type: $msg";
$hash->{CHANGED}[0] = "$type: $msg";
return $hash->{NAME};
}
@@ -503,13 +503,13 @@ FHZ_ReadAnswer($$$)
}
- Log 4, "FHZ/RAW: " . unpack('H*',$buf);
+ Log3 $hash, 4, "FHZ/RAW: " . unpack('H*',$buf);
$mfhzdata .= $buf;
next if(length($mfhzdata) < 2);
my $len = ord(substr($mfhzdata,1,1)) + 2;
if($len>20) {
- Log 4, "Oversized message (" . unpack('H*',$mfhzdata) .
+ Log3 $hash, 4, "Oversized message (" . unpack('H*',$mfhzdata) .
"), dropping it ...";
return undef;
}
@@ -555,7 +555,7 @@ FHZ_XmitLimitCheck($$)
if(@b > 163) { # Maximum nr of transmissions per hour (unconfirmed).
my $me = $hash->{NAME};
- Log GetLogLevel($me,2), "FHZ TRANSMIT LIMIT EXCEEDED";
+ Log3 $me, 2, "FHZ TRANSMIT LIMIT EXCEEDED";
DoTrigger($me, "TRANSMIT LIMIT EXCEEDED");
} else {
@@ -574,7 +574,7 @@ FHZ_Write($$$)
my ($hash,$fn,$msg) = @_;
if(!$hash || !defined($hash->{PortObj})) {
- Log 5, "FHZ device $hash->{NAME} is not active, cannot send";
+ Log3 $hash, 5, "FHZ device $hash->{NAME} is not active, cannot send";
return;
}
@@ -589,7 +589,7 @@ FHZ_Write($$$)
my $bstring = FHZ_CompleteMsg($fn, $msg);
- Log 5, "Sending " . unpack('H*', $bstring);
+ Log3 $hash, 5, "Sending " . unpack('H*', $bstring);
if(!$hash->{QUEUE}) {
@@ -637,7 +637,7 @@ FHZ_Reopen($)
my $dev = $hash->{DeviceName};
$hash->{PortObj}->close();
- Log 1, "USB device $dev closed";
+ Log3 $hash, 1, "USB device $dev closed";
for(;;) {
sleep(5);
if($^O =~ m/Win/) {
@@ -646,7 +646,7 @@ FHZ_Reopen($)
$hash->{PortObj} = new Device::SerialPort($dev);
}
if($hash->{PortObj}) {
- Log 1, "USB device $dev reopened";
+ Log3 $hash, 1, "USB device $dev reopened";
$hash->{FD} = $hash->{PortObj}->FILENO if($^O !~ m/Win/);
FHZ_DoInit($hash->{NAME}, $hash->{ttytype}, $hash->{PortObj});
return;
@@ -665,7 +665,7 @@ FHZ_Close($)
my $name = $hash->{NAME};
$hash->{PortObj}->close();
- Log 1, "USB device $dev closed";
+ Log3 $name, 1, "USB device $dev closed";
delete($hash->{PortObj});
delete($hash->{FD});
delete($selectlist{"$name.$dev"});
@@ -722,7 +722,7 @@ FHZ_Read($)
if(!defined($buf) || length($buf) == 0) {
my $dev = $hash->{DeviceName};
- Log 1, "USB device $dev disconnected, waiting to reappear";
+ Log3 $name, 1, "USB device $dev disconnected, waiting to reappear";
delete($hash->{FD});
$hash->{PortObj}->close();
delete($hash->{PortObj});
@@ -740,7 +740,7 @@ FHZ_Read($)
my $fhzdata = $hash->{PARTIAL};
- Log 4, "FHZ/RAW: " . unpack('H*',$buf) .
+ Log3 $name, 4, "FHZ/RAW: " . unpack('H*',$buf) .
" (Unparsed: " . unpack('H*', $fhzdata) . ")";
$fhzdata .= $buf;
@@ -751,18 +751,18 @@ FHZ_Read($)
my $si = index($fhzdata, $msgstart);
if($si) {
if($si == -1) {
- Log(5, "Bogus message received, no start character found");
+ Log3 $name, 5, "Bogus message received, no start character found";
$fhzdata = "";
last;
} else {
- Log(5, "Bogus message received, skipping to start character");
+ Log3 $name, 5, "Bogus message received, skipping to start character";
$fhzdata = substr($fhzdata, $si);
}
}
my $len = ord(substr($fhzdata,1,1)) + 2;
if($len>20) {
- Log 4,
+ Log3 $name, 4,
"Oversized message (" . unpack('H*',$fhzdata) . "), dropping it ...";
$fhzdata = "";
next;
@@ -788,7 +788,7 @@ FHZ_Read($)
} else {
- Log 4, "Bad CRC message, skipping it (Bogus message follows)";
+ Log3 $name, 4, "Bad CRC message, skipping it (Bogus message follows)";
$fhzdata = substr($fhzdata, 2);
}
@@ -865,7 +865,7 @@ FHZ_Read($)
define fhz_timer at +*00:01:00 set FHZ time
- See the loglevel to prevent logging of
+ See the verbose to prevent logging of
this command.
+ Note:Deprecated! The module maintainer is encouraged to replace it
+ with verbose.
+
Set the device loglevel to e.g. 6 if you do not wish messages from a
given device to appear in the global logfile (FHZ/FS20/FHT). E.g. to
set the FHT time, you should schedule "set FHZ time" every minute, but
diff --git a/fhem/FHEM/00_LIRC.pm b/fhem/FHEM/00_LIRC.pm
index 9de21056f..a09a72c67 100644
--- a/fhem/FHEM/00_LIRC.pm
+++ b/fhem/FHEM/00_LIRC.pm
@@ -14,7 +14,6 @@ sub
LIRC_Initialize($)
{
my ($hash) = @_;
- Log 1, "LIRC_Initialize";
# Provider
$hash->{ReadFn} = "LIRC_Read";
@@ -24,7 +23,7 @@ LIRC_Initialize($)
# Consumer
$hash->{DefFn} = "LIRC_Define";
$hash->{UndefFn} = "LIRC_Undef";
- $hash->{AttrList}= "loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList}= "";
}
#####################################
@@ -43,7 +42,7 @@ LIRC_Define($$)
my $name = $a[0];
my $config = $a[2];
- Log 3, "LIRC opening $name device $config";
+ Log3 $name, 3, "LIRC opening $name device $config";
my $lirc = Lirc::Client->new({
prog => 'fhem',
rcfile => "$config",
@@ -51,7 +50,7 @@ LIRC_Define($$)
fake => 0,
});
return "Can't open $config: $!\n" if(!$lirc);
- Log 3, "LIRC opened $name device $config";
+ Log3 $name, 3, "LIRC opened $name device $config";
my $select = IO::Select->new();
$select->add( $lirc->sock );
@@ -95,7 +94,7 @@ LIRC_Read($)
my @codes = $lirc->next_codes; # should not block
my $name = $hash->{NAME};
for my $code (@codes){
- Log GetLogLevel($name,3), "LIRC $name $code";
+ Log3 $name, 3, "LIRC $name $code";
DoTrigger($name, $code);
}
}
@@ -160,7 +159,6 @@ LIRC_Ready($)
Attributes
-
diff --git a/fhem/FHEM/00_ZWDongle.pm b/fhem/FHEM/00_ZWDongle.pm
index 006887d31..d249aecbe 100755
--- a/fhem/FHEM/00_ZWDongle.pm
+++ b/fhem/FHEM/00_ZWDongle.pm
@@ -155,8 +155,7 @@ ZWDongle_Initialize($)
$hash->{DefFn} = "ZWDongle_Define";
$hash->{SetFn} = "ZWDongle_Set";
$hash->{GetFn} = "ZWDongle_Get";
- $hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 " .
- "model:ZWDongle loglevel:0,1,2,3,4,5,6 ";
+ $hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 model:ZWDongle";
}
#####################################
@@ -185,7 +184,8 @@ ZWDongle_Define($$)
if($dev =~ m/none:(.*)/) {
$hash->{homeId} = $1;
- Log 1, "$name device is none (homeId:$1), commands will be echoed only";
+ Log3 $name, 1,
+ "$name device is none (homeId:$1), commands will be echoed only";
$attr{$name}{dummy} = 1;
return undef;
@@ -404,7 +404,6 @@ ZWDongle_Read($@)
return "" if(!defined($buf));
my $name = $hash->{NAME};
- my $ll5 = GetLogLevel($name,5);
$buf = unpack('H*', $buf);
# The dongle looses data over USB for some commands(?), and dropping the old
@@ -415,7 +414,7 @@ ZWDongle_Read($@)
$hash->{READ_TS} = $ts; # Flush old data.
- Log 5, "ZWDongle/RAW: $data/$buf";
+ Log3 $name, 5, "ZWDongle/RAW: $data/$buf";
$data .= $buf;
my $msg;
@@ -427,12 +426,12 @@ ZWDongle_Read($@)
next;
}
if($fb eq "15") { # NACK
- Log 1, "$name: NACK received";
+ Log3 $name, 1, "$name: NACK received";
$data = substr($data, 2);
next;
}
if($fb ne "01") { # SOF
- Log 1, "$name: SOF missing (got $fb instead of 01)";
+ Log3 $name, 1, "$name: SOF missing (got $fb instead of 01)";
last;
}
@@ -446,11 +445,11 @@ ZWDongle_Read($@)
my $ccs = ZWDongle_CheckSum("$len$msg"); # Computed Checksum
if($rcs ne $ccs) {
- Log 1, "$name: wrong checksum: received $rcs, computed $ccs";
+ Log3 $name, 1, "$name: wrong checksum: received $rcs, computed $ccs";
next;
}
DevIo_SimpleWrite($hash, "06", 1); # Send ACK
- Log $ll5, "ZWDongle_Read $name: $msg";
+ Log3 $name, 5, "ZWDongle_Read $name: $msg";
last if(defined($local) && (!defined($regexp) || ($msg =~ m/$regexp/)));
ZWDongle_Parse($hash, $name, $msg);
$msg = undef;
@@ -621,7 +620,6 @@ ZWDongle_Ready($)
diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm
index b407fa975..65ab75c14 100755
--- a/fhem/FHEM/01_FHEMWEB.pm
+++ b/fhem/FHEM/01_FHEMWEB.pm
@@ -111,7 +111,7 @@ FHEMWEB_Initialize($)
$hash->{NotifyFn}= "FW_SecurityCheck";
$hash->{ActivateInformFn} = "FW_ActivateInform";
$hash->{AttrList}=
- "loglevel:0,1,2,3,4,5,6 webname fwcompress:0,1 ".
+ "webname fwcompress:0,1 ".
"plotmode:gnuplot,gnuplot-scroll,SVG plotsize endPlotToday:1,0 plotfork ".
"stylesheetPrefix touchpad:deprecated smallscreen:deprecated ".
"basicAuth basicAuthMsg hiddenroom hiddengroup HTTPS allowfrom CORS:0,1 ".
@@ -175,7 +175,7 @@ FW_Define($$)
# Make sure that fhem only runs once
if($ret && !$init_done) {
- Log 1, "$ret. Exiting.";
+ Log3 $hash, 1, "$ret. Exiting.";
exit(1);
}
@@ -351,7 +351,6 @@ FW_serveSpecial($$$$)
$file = "$FW_sp$file" if($ext eq "css" && -f "$dir/$FW_sp$file.$ext");
$FW_RETTYPE = ext2MIMEType($ext);
- #Log 1, "Serving $dir/$file.$ext as $FW_RETTYPE, cacheable:$cacheable";
return FW_returnFileAsStream("$dir/$file.$ext", "",
$FW_RETTYPE, 0, $cacheable);
}
@@ -645,7 +644,7 @@ FW_digestCgi($)
$cmd.=" $arg{$c}" if(defined($arg{$c}) &&
($arg{$c} ne "state" || $cmd !~ m/^set/));
$cmd.=" $val{$c}" if(defined($val{$c}));
-#Log 1, "GOT:$arg -> CMD:$cmd";
+#Log3 $FW_wname, 1, "GOT:$arg -> CMD:$cmd";
return ($cmd, $c);
}
@@ -2278,13 +2277,13 @@ FW_ActivateInform()
Get
-
returns the absolute path to the logical icon. Example:
+ get myFHEMWEB icon FS20.on
/data/Homeautomation/fhem/FHEM/FS20.on.png
return FHEMWEB specific directories, where files for given types are
located
@@ -2430,8 +2429,6 @@ FW_ActivateInform()
-
diff --git a/fhem/FHEM/10_FBDECT.pm b/fhem/FHEM/10_FBDECT.pm
index 72ec45e94..caa0eaf22 100755
--- a/fhem/FHEM/10_FBDECT.pm
+++ b/fhem/FHEM/10_FBDECT.pm
@@ -41,7 +41,7 @@ FBDECT_Initialize($)
$hash->{ParseFn} = "FBDECT_Parse";
$hash->{AttrList} =
"IODev do_not_notify:1,0 ignore:1,0 dummy:1,0 showtime:1,0 ".
- "loglevel:0,1,2,3,4,5,6 $readingFnAttributes " .
+ "$readingFnAttributes " .
"model:".join(",", sort @fbdect_models);
}
@@ -144,7 +144,7 @@ FBDECT_Parse($$@)
my $mt = substr($msg, 0, 2);
if($mt ne "07" && $mt ne "04") {
- Log 1, "FBDECT: unknown message type $mt";
+ Log3 $ioName, 1, "FBDECT: unknown message type $mt";
return ""; # Nobody else is able to handle this
}
@@ -152,7 +152,7 @@ FBDECT_Parse($$@)
my $hash = $modules{FBDECT}{defptr}{$id};
if(!$hash) {
my $ret = "UNDEFINED FBDECT_$id FBDECT $id switch";
- Log 3, "$ret, please define it";
+ Log3 $ioName, 3, "$ret, please define it";
DoTrigger("global", $ret);
return "";
}
@@ -276,7 +276,6 @@ FBDECT_Undef($$)
If this attribute is set, fhem automatically accounts for rain counter
diff --git a/fhem/FHEM/14_CUL_TX.pm b/fhem/FHEM/14_CUL_TX.pm
index a8e3539c8..63a3b6d8a 100644
--- a/fhem/FHEM/14_CUL_TX.pm
+++ b/fhem/FHEM/14_CUL_TX.pm
@@ -17,8 +17,7 @@ CUL_TX_Initialize($)
$hash->{DefFn} = "CUL_TX_Define";
$hash->{UndefFn} = "CUL_TX_Undef";
$hash->{ParseFn} = "CUL_TX_Parse";
- $hash->{AttrList} = "IODev do_not_notify:1,0 ignore:0,1 " .
- "showtime:1,0 loglevel:0,1,2,3,4,5,6 " .
+ $hash->{AttrList} = "IODev do_not_notify:1,0 ignore:0,1 showtime:1,0 " .
$readingFnAttributes;
}
@@ -40,7 +39,6 @@ CUL_TX_Define($$)
$modules{CUL_TX}{defptr}{$a[2]} = $hash;
$hash->{STATE} = "Defined";
- Log 4, "CUL_TX defined $a[0] $a[2]";
return undef;
}
@@ -68,21 +66,20 @@ CUL_TX_Parse($$)
my $id3 = (hex($a[3])<<3) + (hex($a[4])>>1);
if($a[5] ne $a[8] || $a[6] ne $a[9]) {
- Log 4, "CUL_TX $id3 ($msg) data error";
+ Log3 $hash, 4, "CUL_TX $id3 ($msg) data error";
return "";
}
my $def = $modules{CUL_TX}{defptr}{$id3};
if(!$def) {
- Log 2, "CUL_TX Unknown device $id3, please define it";
+ Log3 $hash, 2, "CUL_TX Unknown device $id3, please define it";
return "UNDEFINED CUL_TX_$id3 CUL_TX $id3" if(!$def);
}
my $now = time();
my $name = $def->{NAME};
- my $ll4 = GetLogLevel($name,4);
- Log $ll4, "CUL_TX $name $id3 ($msg)";
+ Log3 $name, 4, "CUL_TX $name $id3 ($msg)";
my ($msgtype, $val);
my $valraw = ($a[5].$a[6].".".$a[7]);
@@ -94,7 +91,7 @@ CUL_TX_Parse($$)
$def->{lastT} = $now;
$msgtype = "temperature";
$val = sprintf("%2.1f", ($valraw - 50 + $def->{corr}) );
- Log $ll4, "CUL_TX $msgtype $name $id3 T: $val F: $id2";
+ Log3 $name, 4, "CUL_TX $msgtype $name $id3 T: $val F: $id2";
} elsif ($type eq "E") {
if($now - $def->{lastH} < $def->{minsecs} ) {
@@ -103,11 +100,10 @@ CUL_TX_Parse($$)
$def->{lastH} = $now;
$msgtype = "humidity";
$val = $valraw;
- Log $ll4, "CUL_TX $msgtype $name $id3 H: $val F: $id2";
+ Log3 $name, 4, "CUL_TX $msgtype $name $id3 H: $val F: $id2";
} else {
- my $ll2 = GetLogLevel($name,4);
- Log $ll2, "CUL_TX $type $name $id3 ($msg) unknown type";
+ Log3 $name, 2, "CUL_TX $type $name $id3 ($msg) unknown type";
return "";
}
@@ -180,7 +176,6 @@ CUL_TX_Parse($$)
-
diff --git a/fhem/FHEM/14_CUL_WS.pm b/fhem/FHEM/14_CUL_WS.pm
index c9bcd6076..f71753680 100755
--- a/fhem/FHEM/14_CUL_WS.pm
+++ b/fhem/FHEM/14_CUL_WS.pm
@@ -26,7 +26,7 @@ CUL_WS_Initialize($)
$hash->{AttrFn} = "CUL_WS_Attr";
$hash->{ParseFn} = "CUL_WS_Parse";
$hash->{AttrList} = "IODev do_not_notify:0,1 showtime:0,1 ".
- "model:S300TH,KS300 loglevel ignore:0,1 ".
+ "model:S300TH,KS300 ignore:0,1 ".
$readingFnAttributes;
}
@@ -115,7 +115,7 @@ CUL_WS_Parse($$)
my $def = $modules{CUL_WS}{defptr}{$hash->{NAME} . "." . $cde};
$def = $modules{CUL_WS}{defptr}{$cde} if(!$def);
if(!$def) {
- Log 1, "CUL_WS UNDEFINED $type sensor detected, code $cde";
+ Log3 $hash, 1, "CUL_WS UNDEFINED $type sensor detected, code $cde";
return "UNDEFINED CUL_WS_$cde CUL_WS $cde";
}
@@ -232,7 +232,8 @@ CUL_WS_Parse($$)
if(@a == 9 && int(@a) > 8) { # S300TH
# Sanity check
if (!($msg =~ /^K[0-9A-F]\d\d\d\d\d\d\d$/ )) {
- Log GetLogLevel($name,1), "Error: S300TH CUL_WS Cannot decode $msg (sanitycheck). Malformed";
+ Log3 $name, 1,
+ "Error: S300TH CUL_WS Cannot decode $msg (sanitycheck). Malformed";
return "";
}
@@ -280,10 +281,10 @@ CUL_WS_Parse($$)
}
if(!$val) {
- Log GetLogLevel($name,1), "CUL_WS Cannot decode $msg";
+ Log3 $name, 1, "CUL_WS Cannot decode $msg";
return "";
}
- Log GetLogLevel($name,4), "CUL_WS $devtype $name: $val";
+ Log3 $name, 4, "CUL_WS $devtype $name: $val";
# Sanity checks
if($NotifyTemperature &&
@@ -294,7 +295,8 @@ CUL_WS_Parse($$)
$hash->{READINGS}{temperature}{VAL};
my $diff = ($NotifyTemperature - $tval)+0;
if($diff < -15.0 || $diff > 15.0) {
- Log 2, "$name: Temp difference ($diff) too large: $val, skipping it";
+ Log3 $name, 2,
+ "$name: Temp difference ($diff) too large: $val, skipping it";
$hash->{READINGS}{strangetemp}{VAL} = $NotifyTemperature;
$hash->{READINGS}{strangetemp}{TIME} = TimeNow();
return "";
@@ -303,7 +305,7 @@ CUL_WS_Parse($$)
delete $hash->{READINGS}{strangetemp} if($hash->{READINGS});
if(defined($hum) && ($hum < 0 || $hum > 100)) {
- Log 1, "BOGUS: $name reading: $val, skipping it";
+ Log3 $name, 1, "BOGUS: $name reading: $val, skipping it";
return "";
}
@@ -392,7 +394,6 @@ CUL_WS_Attr(@)
-
diff --git a/fhem/FHEM/16_CUL_RFR.pm b/fhem/FHEM/16_CUL_RFR.pm
index 0e1b2cdcc..185ff2c1d 100755
--- a/fhem/FHEM/16_CUL_RFR.pm
+++ b/fhem/FHEM/16_CUL_RFR.pm
@@ -20,7 +20,7 @@ CUL_RFR_Initialize($)
$hash->{UndefFn} = "CUL_RFR_Undef";
$hash->{ParseFn} = "CUL_RFR_Parse";
$hash->{AttrList} = "IODev do_not_notify:0,1 model:CUL,CUN,CUR " .
- "loglevel:0,1,2,3,4,5,6 ignore:0,1 addvaltrigger";
+ "ignore:0,1 addvaltrigger";
$hash->{WriteFn} = "CUL_RFR_Write";
$hash->{GetFn} = "CUL_Get";
@@ -93,7 +93,7 @@ CUL_RFR_Parse($$)
my $cde = "${id}${rid}";
if(!$modules{CUL_RFR}{defptr}{$cde}) {
- Log 1, "CUL_RFR detected, Id $id, Router $rid, MSG $smsg";
+ Log3 $iohash, 1, "CUL_RFR detected, Id $id, Router $rid, MSG $smsg";
return "UNDEFINED CUL_RFR_$id CUL_RFR $id $rid";
}
my $hash = $modules{CUL_RFR}{defptr}{$cde};
diff --git a/fhem/FHEM/18_CUL_HOERMANN.pm b/fhem/FHEM/18_CUL_HOERMANN.pm
index 2aa3a0de8..dcea0626e 100755
--- a/fhem/FHEM/18_CUL_HOERMANN.pm
+++ b/fhem/FHEM/18_CUL_HOERMANN.pm
@@ -13,8 +13,7 @@ CUL_HOERMANN_Initialize($)
$hash->{Match} = "^R..........";
$hash->{DefFn} = "CUL_HOERMANN_Define";
$hash->{ParseFn} = "CUL_HOERMANN_Parse";
- $hash->{AttrList} = "IODev do_not_notify:1,0 ignore:0,1 " .
- "showtime:1,0 loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList} = "IODev do_not_notify:1,0 ignore:0,1 showtime:1,0";
}
@@ -50,11 +49,11 @@ CUL_HOERMANN_Parse($$)
$def->{CHANGED}[0] = "toggle";
$def->{READINGS}{state}{TIME} = TimeNow();
$def->{READINGS}{state}{VAL} = "toggle";
- Log GetLogLevel($name,4), "CUL_HOERMANN $name toggle";
+ Log3 $name, 4, "CUL_HOERMANN $name toggle";
return $name;
} else {
- Log 3, "CUL_HOERMANN Unknown device $cde, please define it";
+ Log3 $hash, 3, "CUL_HOERMANN Unknown device $cde, please define it";
return "UNDEFINED CUL_HOERMANN_$cde CUL_HOERMANN $cde";
}
}
@@ -92,7 +91,6 @@ CUL_HOERMANN_Parse($$)
diff --git a/fhem/FHEM/24_NetIO230B.pm b/fhem/FHEM/24_NetIO230B.pm
index 0787f6ed1..89fa57fb5 100644
--- a/fhem/FHEM/24_NetIO230B.pm
+++ b/fhem/FHEM/24_NetIO230B.pm
@@ -67,7 +67,7 @@ NetIO230B_Initialize($)
$hash->{SetFn} = "NetIO230B_Set";
$hash->{GetFn} = "NetIO230B_Get";
$hash->{DefFn} = "NetIO230B_Define";
- $hash->{AttrList} = "loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList} = "";
}
@@ -99,7 +99,7 @@ NetIO230B_Set($@)
$result = NetIO230B_Request($hash, "set", join("",@values));
}
- Log 3, "NetIO230B set @a => $result";
+ Log3 $hash, 3, "NetIO230B set @a => $result";
return undef;
}
@@ -110,7 +110,7 @@ NetIO230B_Get($@)
{
my ($hash, @a) = @_;
my $result = NetIO230B_Request($hash, "get");
- Log 3, "NetIO230B get @a => $result";
+ Log3 $hash, 3, "NetIO230B get @a => $result";
return $hash->{STATE};
}
@@ -134,7 +134,7 @@ NetIO230B_Request($@)
my $response = GetFileFromURL("http://"."$hash->{HOST}/tgi/control.tgi?l=p:". $hash->{USER}.":".$hash->{PASS}."&p=".$parm, $timeout, undef, $noshutdown );
if(!$response or length($response)==0)
{
- Log 3, "NetIO230B_Request failed: ".$log;
+ Log3 $hash, 3, "NetIO230B_Request failed: ".$log;
return("");
}
@@ -173,7 +173,7 @@ NetIO230B_Request($@)
# debug output
#my %k = %{$hash->{READINGS}};
#foreach my $r (sort keys %k) {
- # Log 1, "$r S: $k{$r}{VAL} T: $k{$r}{TIME}";
+ # Log3 $hash, 1, "$r S: $k{$r}{VAL} T: $k{$r}{TIME}";
#}
return $response;
@@ -188,7 +188,7 @@ NetIO230B_Define($$)
my @a = split("[ \t][ \t]*", $def);
my $paramCount = int(@a);
- Log 3, "Wrong syntax: use 'define
diff --git a/fhem/FHEM/61_EMWZ.pm b/fhem/FHEM/61_EMWZ.pm
index 2cf0bddc6..3fec18387 100755
--- a/fhem/FHEM/61_EMWZ.pm
+++ b/fhem/FHEM/61_EMWZ.pm
@@ -21,7 +21,7 @@ EMWZ_Initialize($)
$hash->{SetFn} = "EMWZ_Set";
$hash->{DefFn} = "EMWZ_Define";
- $hash->{AttrList} = "IODev dummy:1,0 model:EM1000WZ loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList} = "IODev dummy:1,0 model:EM1000WZ";
}
@@ -43,14 +43,14 @@ EMWZ_GetStatus($)
my $d = IOWrite($hash, sprintf("7a%02x", $dnr-1));
if(!defined($d)) {
my $msg = "EMWZ $name read error (GetStatus 1)";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
if($d eq ((pack('H*',"00") x 45) . pack('H*',"FF") x 6)) {
my $msg = "EMWZ no device no. $dnr present";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
@@ -58,7 +58,7 @@ EMWZ_GetStatus($)
my $ec=w($d,49) / 10;
if($ec <= 0) {
my $msg = "EMWZ read error (GetStatus 2)";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
my $cur_energy = $pulses / $ec; # ec = U/kWh
@@ -66,7 +66,7 @@ EMWZ_GetStatus($)
if($cur_power > 30) { # 20Amp x 3 Phase
my $msg = "EMWZ Bogus reading: curr. power is reported to be $cur_power";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
@@ -99,7 +99,7 @@ EMWZ_GetStatus($)
}
$hash->{STATE} = "$cur_power kW";
- Log GetLogLevel($name,4), "EMWZ $name: $cur_power kW / $vals{energy}";
+ Log3 $name, 4, "EMWZ $name: $cur_power kW / $vals{energy}";
return $hash->{STATE};
}
@@ -152,13 +152,13 @@ EMWZ_Set($@)
my $ret = IOWrite($hash, $msg);
if(!defined($ret)) {
my $msg = "EMWZ $name read error (Set)";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
if(ord(substr($ret,0,1)) != 6) {
$ret = "EMWZ Error occured: " . unpack('H*', $ret);
- Log GetLogLevel($name,2), $ret;
+ Log3 $name, 2, $ret;
return $ret;
}
@@ -245,7 +245,6 @@ EMWZ_Define($$)
diff --git a/fhem/FHEM/62_EMEM.pm b/fhem/FHEM/62_EMEM.pm
index 0e71d564c..1933e35b0 100755
--- a/fhem/FHEM/62_EMEM.pm
+++ b/fhem/FHEM/62_EMEM.pm
@@ -19,7 +19,7 @@ EMEM_Initialize($)
$hash->{GetFn} = "EMEM_Get";
$hash->{DefFn} = "EMEM_Define";
- $hash->{AttrList} = "IODev dummy:1,0 model:EM1000EM loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList} = "IODev dummy:1,0 model:EM1000EM";
}
###################################
@@ -40,13 +40,13 @@ EMEM_GetStatus($)
my $d = IOWrite($hash, sprintf("7a%02x", $dnr-1));
if(!defined($d)) {
my $msg = "EMEM $name read error (GetStatus 1)";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
if($d eq ((pack('H*',"00") x 45) . pack('H*',"FF") x 6)) {
my $msg = "EMEM no device no. $dnr present";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
@@ -58,7 +58,7 @@ EMEM_GetStatus($)
if($cur_power > 30) { # 20Amp x 3 Phase
my $msg = "EMEM Bogus reading: curr. power is reported to be $cur_power, setting to -1";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
#return $msg;
$cur_power = -1.0;
}
@@ -93,7 +93,7 @@ EMEM_GetStatus($)
}
$hash->{STATE} = "$cur_power kW";
- Log GetLogLevel($name,4), "EMEM $name: $cur_power kW / $vals{energy_kWh} kWh";
+ Log3 $name, 4, "EMEM $name: $cur_power kW / $vals{energy_kWh} kWh";
return $hash->{STATE};
}
@@ -183,7 +183,6 @@ EMEM_Define($$)
diff --git a/fhem/FHEM/63_EMGZ.pm b/fhem/FHEM/63_EMGZ.pm
index f5325b54e..f39860240 100644
--- a/fhem/FHEM/63_EMGZ.pm
+++ b/fhem/FHEM/63_EMGZ.pm
@@ -21,7 +21,7 @@ EMGZ_Initialize($)
$hash->{SetFn} = "EMGZ_Set";
$hash->{DefFn} = "EMGZ_Define";
- $hash->{AttrList} = "IODev dummy:1,0 model:EM1000GZ loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList} = "IODev dummy:1,0 model:EM1000GZ";
}
@@ -43,14 +43,14 @@ EMGZ_GetStatus($)
my $d = IOWrite($hash, sprintf("7a%02x", $dnr-1));
if(!defined($d)) {
my $msg = "EMGZ $name read error (GetStatus 1)";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
if($d eq ((pack('H*',"00") x 45) . pack('H*',"FF") x 6)) {
my $msg = "EMGZ no device no. $dnr present";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
@@ -63,7 +63,7 @@ EMGZ_GetStatus($)
if($cur_power > 30) { # depending on "Anschlussleistung"
my $msg = "EMGZ Bogus reading: curr. power is reported to be $cur_power";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
@@ -93,7 +93,7 @@ EMGZ_GetStatus($)
}
$hash->{STATE} = "$cur_power m3ph";
- Log GetLogLevel($name,4), "EMGZ $name: $cur_power m3ph / $vals{act_flow_m3}";
+ Log3 $name, 4, "EMGZ $name: $cur_power m3ph / $vals{act_flow_m3}";
return $hash->{STATE};
}
@@ -139,13 +139,13 @@ EMGZ_Set($@)
my $ret = IOWrite($hash, $msg);
if(!defined($ret)) {
$msg = "EMWZ $name read error (Set)";
- Log GetLogLevel($name,2), $msg;
+ Log3 $name, 2, $msg;
return $msg;
}
if(ord(substr($ret,0,1)) != 6) {
$ret = "EMGZ Error occured: " . unpack('H*', $ret);
- Log GetLogLevel($name,2), $ret;
+ Log3 $name, 2, $ret;
return $ret;
}
@@ -222,7 +222,6 @@ EMGZ_Define($$)
diff --git a/fhem/FHEM/70_SCIVT.pm b/fhem/FHEM/70_SCIVT.pm
index 5e4642747..7da7f5bf1 100644
--- a/fhem/FHEM/70_SCIVT.pm
+++ b/fhem/FHEM/70_SCIVT.pm
@@ -21,7 +21,7 @@ SCIVT_Initialize($)
$hash->{DefFn} = "SCIVT_Define";
$hash->{GetFn} = "SCIVT_Get";
$hash->{SetFn} = "SCIVT_Set";
- $hash->{AttrList}= "model:SCD10,SCD20,SCD30 loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList}= "model:SCD10,SCD20,SCD30";
}
#####################################
@@ -37,14 +37,14 @@ SCIVT_Define($$)
my $dev = $a[2];
- Log 1, "SCIVT device is none, commands will be echoed only"
+ Log3 $hash, 1, "SCIVT device is none, commands will be echoed only"
if($dev eq "none");
if($dev ne "none") {
- Log 3, "SCIVT opening device $dev";
+ Log3 $hash, 3, "SCIVT opening device $dev";
my $po = new Device::SerialPort ($dev);
return "SCIVT Can't open $dev: $!" if(!$po);
- Log 2, "SCIVT opened device $dev";
+ Log3 $hash, 2, "SCIVT opened device $dev";
$po->close();
}
@@ -75,7 +75,7 @@ SCIVT_Set($@)
my ($hash, @a) = @_;
return "\"set SCIVT\" needs at least two parameter" if(@a < 3);
my $name = $hash->{NAME};
-Log GetLogLevel($name,4), "SCIVT Set request $a[1] $a[2], old: Timer:$hash->{Timer} Cmd: $hash->{Cmd}";
+Log3 $name, 4, "SCIVT Set request $a[1] $a[2], old: Timer:$hash->{Timer} Cmd: $hash->{Cmd}";
return "Unknown argument $a[1], choose one of " . join(" ", sort keys %sets)
if(!defined($sets{$a[1]}));
@@ -113,7 +113,7 @@ if($type eq "cmd")
DoTrigger($name, undef) if($init_done);
-Log GetLogLevel($name,3), "SCIVT Set result Timer:$hash->{Timer} sec Cmd:$hash->{Cmd}";
+Log3 $name, 3, "SCIVT Set result Timer:$hash->{Timer} sec Cmd:$hash->{Cmd}";
return "SCIVT => Timer:$hash->{Timer} Cmd:$hash->{Cmd}";
}
@@ -131,7 +131,7 @@ if($a[1] eq "data")
$v = SCIVT_GetLine($hash->{DeviceName}, $hash->{Cmd});
if(!defined($v))
{
- Log GetLogLevel($name,2), "SCIVT Get $a[1] error";
+ Log3 $name, 2, "SCIVT Get $a[1] error";
return "$a[0] $a[1] => Error";
}
$v =~ s/[\r\n]//g; # Delete the NewLine
@@ -150,7 +150,7 @@ else
}
}
-Log GetLogLevel($name,3), "SCIVT Get $a[1] $v";
+Log3 $name, 3, "SCIVT Get $a[1] $v";
return "$a[0] $a[1] => $v";
}
@@ -170,26 +170,26 @@ my $result = SCIVT_GetLine($hash->{DeviceName}, $hash->{Cmd});
if(!defined($result))
{
- Log GetLogLevel($name,4), "SCIVT read error, retry $hash->{DeviceName}, $hash->{Cmd}";
+ Log3 $name, 4, "SCIVT read error, retry $hash->{DeviceName}, $hash->{Cmd}";
$result = SCIVT_GetLine($hash->{DeviceName}, $hash->{Cmd});
}
if(!defined($result))
{
- Log GetLogLevel($name,2), "SCIVT read error, abort $hash->{DeviceName}, $hash->{Cmd}";
+ Log3 $name, 2, "SCIVT read error, abort $hash->{DeviceName}, $hash->{Cmd}";
$hash->{STATE} = "timeout";
return $hash->{STATE};
}
if (length($result) < 10)
{
- Log GetLogLevel($name,2), "SCIVT incomplete line ($result)";
+ Log3 $name, 2, "SCIVT incomplete line ($result)";
$hash->{STATE} = "incomplete";
}
else
{
$result =~ s/^.*R://;
$result =~ s/[\r\n ]//g;
- Log GetLogLevel($name,3), "SCIVT $result (raw)";
+ Log3 $name, 3, "SCIVT $result (raw)";
$result=~ s/,/./g;
my @data = split(";", $result);
@@ -223,7 +223,7 @@ my ($dev,$cmd) = @_;
my $serport = new Device::SerialPort ($dev);
if(!$serport) {
- Log 1, "SCIVT: Can't open $dev: $!";
+ Log3 undef, 1, "SCIVT: Can't open $dev: $!";
return undef;
}
$serport->reset_error();
@@ -267,7 +267,7 @@ my ($dev,$cmd) = @_;
DONE:
$serport->close();
- Log 3, "SCIVT $rm";
+ Log3 undef, 3, "SCIVT $rm";
return undef;
}
@@ -318,7 +318,6 @@ DONE:
Attributes
diff --git a/fhem/FHEM/90_at.pm b/fhem/FHEM/90_at.pm
index 320ff7923..a67728518 100755
--- a/fhem/FHEM/90_at.pm
+++ b/fhem/FHEM/90_at.pm
@@ -16,8 +16,7 @@ at_Initialize($)
$hash->{UndefFn} = "at_Undef";
$hash->{AttrFn} = "at_Attr";
$hash->{StateFn} = "at_State";
- $hash->{AttrList} = "disable:0,1 skip_next:0,1 loglevel:0,1,2,3,4,5,6 ".
- "alignTime";
+ $hash->{AttrList} = "disable:0,1 skip_next:0,1 alignTime";
}
@@ -120,8 +119,7 @@ at_Exec($)
return if($hash->{DELETED}); # Just deleted
my $name = $hash->{NAME};
- my $ll5 = GetLogLevel($name,5);
- Log $ll5, "exec at command $name";
+ Log3 $name, 5, "exec at command $name";
if(defined($attr{$name})) {
$skip = 1 if($attr{$name} && $attr{$name}{skip_next});
@@ -132,7 +130,7 @@ at_Exec($)
my (undef, $command) = split("[ \t]+", $hash->{DEF}, 2);
$command = SemicolonEscape($command);
my $ret = AnalyzeCommandChain(undef, $command) if(!$skip && !$disable);
- Log GetLogLevel($name,3), "$name: $ret" if($ret);
+ Log3 $name, 3, "$name: $ret" if($ret);
return if($hash->{DELETED}); # Deleted in the Command
@@ -150,7 +148,7 @@ at_Exec($)
if($count) {
$def =~ s/{\d+}/{$count}/ if($def =~ m/^\+?\*{\d+}/); # Replace the count
- Log $ll5, "redefine at command $name as $def";
+ Log3 $name, 5, "redefine at command $name as $def";
$data{AT_RECOMPUTE} = 1; # Tell sunrise compute the next day
CommandDefine(undef, "$name at $def"); # Recompute the next TRIGGERTIME
diff --git a/fhem/FHEM/91_eventTypes.pm b/fhem/FHEM/91_eventTypes.pm
index 537aa3c3b..bb802ff40 100755
--- a/fhem/FHEM/91_eventTypes.pm
+++ b/fhem/FHEM/91_eventTypes.pm
@@ -18,7 +18,7 @@ eventTypes_Initialize($)
$hash->{GetFn} = "eventTypes_Get";
$hash->{SetFn} = "eventTypes_Set";
$hash->{AttrFn} = "eventTypes_Attr";
- $hash->{AttrList} = "disable:0,1 loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList} = "disable:0,1";
}
@@ -60,7 +60,6 @@ eventTypes_Notify($$)
my $t = $eventSrc->{TYPE};
my $n = $eventSrc->{NAME};
- my $ll4 = GetLogLevel($ln, 4);
my $ret = "";
foreach my $oe (@{$eventSrc->{CHANGED}}) {
@@ -68,7 +67,7 @@ eventTypes_Notify($$)
my $ne = $oe;
$ne =~ s/\b-?\d*\.?\d+\b/.*/g;
$ne =~ s/set_\d+/set_.*/; # HM special :/
- Log $ll4, "$ln: $t $n $oe -> $ne";
+ Log3 $ln, 4, "$ln: $t $n $oe -> $ne";
$modules{eventTypes}{ldata}{$n}{$ne}++;
}
return undef;
@@ -182,7 +181,6 @@ eventTypes_Get($@)
Attributes
diff --git a/fhem/FHEM/91_notify.pm b/fhem/FHEM/91_notify.pm
index 1498dc974..3c3ef1856 100755
--- a/fhem/FHEM/91_notify.pm
+++ b/fhem/FHEM/91_notify.pm
@@ -14,7 +14,7 @@ notify_Initialize($)
$hash->{DefFn} = "notify_Define";
$hash->{NotifyFn} = "notify_Exec";
$hash->{AttrFn} = "notify_Attr";
- $hash->{AttrList} = "disable:0,1 forwardReturnValue:0,1 loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList} = "disable:0,1 forwardReturnValue:0,1";
}
@@ -68,7 +68,7 @@ notify_Exec($$)
$found = ("$n:$s" =~ m/^$re$/);
}
if($found) {
- Log GetLogLevel($ln, 5), "Triggering $ln";
+ Log3 $ln, 5, "Triggering $ln";
my (undef, $exec) = split("[ \t]+", $ntfy->{DEF}, 2);
my %specials= (
@@ -79,7 +79,7 @@ notify_Exec($$)
$exec= EvalSpecials($exec, %specials);
my $r = AnalyzeCommandChain(undef, $exec);
- Log GetLogLevel($ln, 3), "$ln return value: $r" if($r);
+ Log3 $ln, 3, "$ln return value: $r" if($r);
$ret .= " $r" if($r);
}
}
@@ -219,7 +219,6 @@ notify_Attr(@)
Attributes
Forward the return value of the executed command to the caller,
diff --git a/fhem/FHEM/91_sequence.pm b/fhem/FHEM/91_sequence.pm
index 776453e46..f30b0b367 100755
--- a/fhem/FHEM/91_sequence.pm
+++ b/fhem/FHEM/91_sequence.pm
@@ -15,7 +15,7 @@ sequence_Initialize($)
$hash->{DefFn} = "sequence_Define";
$hash->{UndefFn} = "sequence_Undef";
$hash->{NotifyFn} = "sequence_Notify";
- $hash->{AttrList} = "disable:0,1 loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList} = "disable:0,1";
}
@@ -71,13 +71,13 @@ sequence_Notify($$)
RemoveInternalTimer($ln);
my $idx = $hash->{IDX} + 2;
- Log GetLogLevel($ln,5), "sequence $ln matched $idx";
+ Log3 $ln, 5, "sequence $ln matched $idx";
my @d = split("[ \t]+", $hash->{DEF});
if($idx > $hash->{MAX}) { # Last element reached
- Log GetLogLevel($ln,5), "sequence $ln triggered";
+ Log3 $ln, 5, "sequence $ln triggered";
DoTrigger($ln, "trigger");
$idx = 0;
@@ -104,7 +104,7 @@ sequence_Trigger($)
my @d = split("[ \t]+", $hash->{DEF});
$hash->{RE} = $d[0];
$hash->{IDX} = 0;
- Log GetLogLevel($ln,5), "sequence $ln timeout";
+ Log3 $ln, 5, "sequence $ln timeout";
}
sub
@@ -155,7 +155,6 @@ sequence_Undef($$)
Attributes
diff --git a/fhem/FHEM/91_watchdog.pm b/fhem/FHEM/91_watchdog.pm
index 805185084..0541b3983 100755
--- a/fhem/FHEM/91_watchdog.pm
+++ b/fhem/FHEM/91_watchdog.pm
@@ -15,8 +15,7 @@ watchdog_Initialize($)
$hash->{DefFn} = "watchdog_Define";
$hash->{UndefFn} = "watchdog_Undef";
$hash->{NotifyFn} = "watchdog_Notify";
- $hash->{AttrList} = "disable:0,1 regexp1WontReactivate:0,1 ".
- "loglevel:0,1,2,3,4,5,6";
+ $hash->{AttrList} = "disable:0,1 regexp1WontReactivate:0,1";
}
@@ -124,7 +123,7 @@ watchdog_Trigger($)
return "";
}
- Log(GetLogLevel($name,3), "Watchdog $name triggered");
+ Log3 $name, 3, "Watchdog $name triggered";
my $exec = SemicolonEscape($watchdog->{CMD});;
$watchdog->{STATE} = "triggered";
@@ -132,7 +131,7 @@ watchdog_Trigger($)
$watchdog->{READINGS}{Triggered}{VAL} = $watchdog->{STATE};
my $ret = AnalyzeCommandChain(undef, $exec);
- Log(GetLogLevel($name,3), $ret) if($ret);
+ Log3 $name, 3, $ret if($ret);
}
sub
@@ -228,7 +227,6 @@ watchdog_Undef($$)
Attributes
diff --git a/fhem/FHEM/95_PachLog.pm b/fhem/FHEM/95_PachLog.pm
index e50ae7f6f..965bd44c0 100644
--- a/fhem/FHEM/95_PachLog.pm
+++ b/fhem/FHEM/95_PachLog.pm
@@ -59,9 +59,8 @@ PachLog_Initialize($)
$hash->{DefFn} = "PachLog_Define";
$hash->{SetFn} = "PachLog_Set";
- $hash->{GetFn} = "PachLog_Get";
$hash->{NotifyFn} = "PachLog_Notify";
- $hash->{AttrList} = "do_not_notify:0,1 loglevel:0,5 disable:0,1";
+ $hash->{AttrList} = "do_not_notify:0,1";
}
#######################################################################
sub PachLog_Define($@)
@@ -71,8 +70,6 @@ sub PachLog_Define($@)
# X-API-Key steht im DEF %defs{
When a watchdog is active, a second event matching regexp1 will
normally reset the timeout. Set this attribute to prevents this.
diff --git a/fhem/FHEM/92_FileLog.pm b/fhem/FHEM/92_FileLog.pm
index 2a9756d68..7ff9bd0b8 100755
--- a/fhem/FHEM/92_FileLog.pm
+++ b/fhem/FHEM/92_FileLog.pm
@@ -37,8 +37,7 @@ FileLog_Initialize($)
$hash->{NotifyFn} = "FileLog_Log";
$hash->{AttrFn} = "FileLog_Attr";
# logtype is used by the frontend
- $hash->{AttrList} = "disable:0,1 logtype nrarchive archivedir archivecmd ".
- "loglevel";
+ $hash->{AttrList} = "disable:0,1 logtype nrarchive archivedir archivecmd";
$hash->{FW_summaryFn} = "FileLog_fhemwebFn";
$hash->{FW_detailFn} = "FileLog_fhemwebFn";
@@ -107,7 +106,7 @@ FileLog_Switch($)
HandleArchiving($log);
$fh = new IO::File ">>$cn";
if(!defined($fh)) {
- Log(0, "Can't open $cn");
+ Log3 $log, 0, "Can't open $cn";
return;
}
$log->{currentlogfile} = $cn;
@@ -273,7 +272,7 @@ FileLog_loadSVG()
{
if(!$modules{SVG}{LOADED} && -f "$attr{global}{modpath}/FHEM/98_SVG.pm") {
my $ret = CommandReload(undef, "98_SVG");
- Log 1, $ret if($ret);
+ Log3 undef, 1, $ret if($ret);
}
}
@@ -505,7 +504,6 @@ FileLog_Get($@)
my $internal;
my $name = $hash->{NAME};
- my $ll = GetLogLevel($name,4);
if($outf eq "INT") {
$outf = "-";
@@ -547,7 +545,7 @@ FileLog_Get($@)
}
$inf = $linf;
}
- Log $ll, "$name get: Input file $inf, from:$from to:$to";
+ Log3 $name, 4, "$name get: Input file $inf, from:$from to:$to";
my $ifh = new IO::File $inf if($inf);
seekTo($inf, $ifh, $hash, $from) if($ifh);
@@ -776,8 +774,9 @@ RESCAN:
$data{"currval$j"} = $lastv[$i];
$data{"currdate$j"} = $lastd[$i];
- Log $ll, "$name get: line $j, regexp:".$d[$i]->{re}.", col:".$d[$i]->{col}.
- ", output lines:".$data{"cnt$j"};
+ Log3 $name, 4,
+ "$name get: line $j, regexp:".$d[$i]->{re}.", col:".$d[$i]->{col}.
+ ", output lines:".$data{"cnt$j"};
}
if($internal) {
@@ -1048,7 +1047,6 @@ seekTo($$$$)
diff --git a/fhem/FHEM/93_FHEM2FHEM.pm b/fhem/FHEM/93_FHEM2FHEM.pm
index a8be37502..261b6de52 100755
--- a/fhem/FHEM/93_FHEM2FHEM.pm
+++ b/fhem/FHEM/93_FHEM2FHEM.pm
@@ -29,8 +29,7 @@ FHEM2FHEM_Initialize($)
# Normal devices
$hash->{DefFn} = "FHEM2FHEM_Define";
$hash->{UndefFn} = "FHEM2FHEM_Undef";
- $hash->{AttrList}= "dummy:1,0 " .
- "loglevel:0,1,2,3,4,5,6 ";
+ $hash->{AttrList}= "dummy:1,0";
}
#####################################
@@ -43,7 +42,7 @@ FHEM2FHEM_Define($$)
if(@a < 4 || @a > 5 || !($a[3] =~ m/^(LOG|RAW):(.*)$/)) {
my $msg = "wrong syntax: define
-
Disables PachLog.
Nor more Logging to www.pachube.com
diff --git a/fhem/FHEM/98_CULflash.pm b/fhem/FHEM/98_CULflash.pm
index a288afc55..014ae9385 100644
--- a/fhem/FHEM/98_CULflash.pm
+++ b/fhem/FHEM/98_CULflash.pm
@@ -80,9 +80,9 @@ CommandCULflash($$)
CUL_SimpleWrite($defs{$cul}, "B01");
sleep(4); # B01 needs 2 seconds for the reset
}
- Log 1, "CULflash $cmd";
+ Log3 undef, 1, "CULflash $cmd";
my $result = `$cmd`;
- Log 1, "CULflash $result";
+ Log3 undef, 1, "CULflash $result";
return $result;
}
diff --git a/fhem/FHEM/98_PID.pm b/fhem/FHEM/98_PID.pm
index 8bdc884f4..803d36e98 100644
--- a/fhem/FHEM/98_PID.pm
+++ b/fhem/FHEM/98_PID.pm
@@ -17,7 +17,7 @@ PID_Initialize($)
$hash->{DefFn} = "PID_Define";
$hash->{SetFn} = "PID_Set";
$hash->{NotifyFn} = "PID_Notify";
- $hash->{AttrList} = "disable:0,1 loglevel:0,1,2,3,4,5,6 roundValveValue:0,1";
+ $hash->{AttrList} = "disable:0,1 roundValveValue:0,1";
}
@@ -39,7 +39,7 @@ PID_Define($$$)
my ($sensor, $reading, $regexp) = split(":", $a[2], 3);
if(!$defs{$sensor}) {
my $msg = "$pn: Unknown sensor device $sensor specified";
- Log 2, $msg;
+ Log3 $pn, 2, $msg;
return $msg;
}
$pid->{sensor} = $sensor;
@@ -50,7 +50,7 @@ PID_Define($$$)
$regexp = '([\\d\\.]*)';
} else {
my $msg = "$pn: Unknown sensor type $t, specify regexp";
- Log 2, $msg;
+ Log3 $pn, 2, $msg;
return $msg;
}
}
@@ -64,7 +64,7 @@ PID_Define($$$)
my ($p_p, $p_i, $p_d) = (0, 0, 0);
if(!$defs{$actor}) {
my $msg = "$pn: Unknown actor device $actor specified";
- Log 2, $msg;
+ Log3 $pn, 2, $msg;
return $msg;
}
$pid->{actor} = $actor;
@@ -79,7 +79,7 @@ PID_Define($$$)
$p_d = 15.0/2.55;
} else {
my $msg = "$pn: Unknown actor type $t, specify command:min:max";
- Log 2, $msg;
+ Log3 $pn, 2, $msg;
return $msg;
}
}
@@ -122,7 +122,7 @@ PID_Set($@)
} elsif ($arg eq "desired" ) {
return "Set desired needs a numeric parameter"
if(@a != 3 || $a[2] !~ m/^[\d\.]*$/);
- Log GetLogLevel($pn,3), "PID set $pn $arg $a[2]";
+ Log3 $pn, 3, "PID set $pn $arg $a[2]";
PID_sv($pid, 'desired', $a[2]);
PID_setValue($pid);
@@ -199,7 +199,7 @@ PID_setValue($)
$inStr = $defs{$sensor}{READINGS}{$reading}{VAL}
if($defs{$sensor}{READINGS} && $defs{$sensor}{READINGS}{$reading});
if(!$inStr) {
- Log GetLogLevel($pn,4), "PID $pn: no $reading yet for $sensor";
+ Log3 $pn, 4, "PID $pn: no $reading yet for $sensor";
return;
}
$inStr =~ m/$re/;
@@ -220,14 +220,14 @@ PID_setValue($)
my $a = PID_saturate($pid, $p + $i + $d);
PID_sv($pid, 'actuation', $a);
- Log GetLogLevel($pn,4), sprintf("PID $pn: p:%.2f i:%.2f d:%.2f", $p, $i, $d);
+ Log3 $pn, 4, sprintf("PID $pn: p:%.2f i:%.2f d:%.2f", $p, $i, $d);
# Hack to round.
my ($satMin, $satMax) = ($pid->{satMin}, $pid->{satMax});
$a = int($a) if(AttrVal($pn, "roundValveValue", ($satMax-$satMin >= 100)));
my $ret = fhem sprintf("set %s %s %g", $pid->{actor}, $pid->{command}, $a);
- Log GetLogLevel($pn,1), "output of $pn command: $ret" if($ret);
+ Log3 $pn, 1, "output of $pn command: $ret" if($ret);
$pid->{STATE} = "$in (delta $delta)";
}
@@ -304,7 +304,6 @@ PID_setValue($)
Attributes
round the valve value to an integer, of the attribute is set to 1.
diff --git a/fhem/FHEM/98_SVG.pm b/fhem/FHEM/98_SVG.pm
index 7d50a7c22..d95967721 100755
--- a/fhem/FHEM/98_SVG.pm
+++ b/fhem/FHEM/98_SVG.pm
@@ -199,12 +199,12 @@ SVG_sel($$$@)
}
sub
-SVG_getRegFromFile($)
+SVG_getRegFromFile($$)
{
- my ($fName) = @_;
+ my ($wName, $fName) = @_;
my $fh = new IO::File $fName;
if(!$fh) {
- Log 1, "$fName: $!";
+ Log3 $wName, 1, "$fName: $!";
return (3, "NoFile", "NoFile");
}
$fh->seek(0, 2); # Go to the end
@@ -284,7 +284,7 @@ SVG_PEdit($$$$)
$ret .= "Input:Column,Regexp,DefaultValue,Function ";
$ret .=" Y-Axis,Plot-Type,Style,Width ";
- my ($colnums, $colregs, $coldata) = SVG_getRegFromFile($file);
+ my ($colnums, $colregs, $coldata) = SVG_getRegFromFile($FW_wname, $file);
$colnums = join(",", 3..$colnums);
my %tickh;
@@ -918,7 +918,7 @@ SVG_render($$$$$$$$$)
SVG_pO join("",
-
Space separated list of commands, which will be returned upon "set name ?",
so the FHEMWEB frontend can construct a dropdown and offer on/off
diff --git a/fhem/FHEM/98_structure.pm b/fhem/FHEM/98_structure.pm
index 00b48852d..3be940234 100755
--- a/fhem/FHEM/98_structure.pm
+++ b/fhem/FHEM/98_structure.pm
@@ -42,7 +42,7 @@ structure_Initialize($)
$hash->{SetFn} = "structure_Set";
$hash->{AttrFn} = "structure_Attr";
$hash->{AttrList} = "clientstate_priority ".
- "clientstate_behavior:relative,absolute,last loglevel:0,5 ".
+ "clientstate_behavior:relative,absolute,last ".
$readingFnAttributes;
addToAttrList("structexclude");
@@ -130,7 +130,6 @@ structure_getChangedDevice($)
sub structure_Notify($$)
{
my ($hash, $dev) = @_;
- #Log 1, Dumper($hash);
my $me = $hash->{NAME};
my $devmap = $hash->{ATTR}."_map";
@@ -184,7 +183,7 @@ sub structure_Notify($$)
return "" if($hash->{INSET}); # Do not trigger for our own set
if($hash->{INNTFY}) {
- Log 1, "ERROR: endless loop detected in structure_Notify $me";
+ Log3 $me, 1, "ERROR: endless loop detected in structure_Notify $me";
return "";
}
$hash->{INNTFY} = 1;
@@ -208,7 +207,7 @@ sub structure_Notify($$)
}
undef @foo;
undef @structPrio;
- #Log 1, Dumper(%priority) . "\n";
+ #Log3 $me, 1, Dumper(%priority) . "\n";
my $minprio = 99999;
my $devstate;
@@ -263,7 +262,7 @@ sub structure_Notify($$)
# wird beim ersten Auftreten sonst nicht weiter geprueft
}
}
- # Log 1, "Dev: ".$d." Anzahl: ".@value." Value:".$value[0]." devstate:
+ # Log3 $me, 1, "Dev:".$d." Anzahl:".@value." Val:".$value[0]." devstate:
# ".$devstate;
$minprio = $priority{$devstate}
if(defined($devstate) &&
@@ -301,7 +300,7 @@ sub structure_Notify($$)
}
- Log GetLogLevel($me,5), "Update structure '$me' to $newState" .
+ Log3 $me, 5, "Update structure '$me' to $newState" .
" because device $dev->{NAME} has changed";
readingsBeginUpdate($hash);
readingsBulkUpdate($hash, "LastDevice", $dev->{NAME});
@@ -382,7 +381,7 @@ structure_Set($@)
foreach my $d (sort keys %{ $hash->{CONTENT} }) {
next if(!$defs{$d});
if($defs{$d}{INSET}) {
- Log 1, "ERROR: endless loop detected for $d in " . $hash->{NAME};
+ Log3 $hash, 1, "ERROR: endless loop detected for $d in " . $hash->{NAME};
next;
}
@@ -403,7 +402,7 @@ structure_Set($@)
}
}
delete($hash->{INSET});
- Log GetLogLevel($hash->{NAME},5), "SET: $ret" if($ret);
+ Log3 $hash, 5, "SET: $ret" if($ret);
return $list[1] eq "?"
? "Unknown argument ?, choose one of " . join(" ", sort keys(%pars))
: undef;
@@ -424,7 +423,7 @@ structure_Attr($@)
my $hash = $defs{$me};
if($hash->{INATTR}) {
- Log 1, "ERROR: endless loop detected in structure_Attr for $me";
+ Log3 $me, 1, "ERROR: endless loop detected in structure_Attr for $me";
next;
}
$hash->{INATTR} = 1;
@@ -450,7 +449,7 @@ structure_Attr($@)
}
}
delete($hash->{INATTR});
- Log GetLogLevel($me,4), "Stucture attr $type: $ret" if($ret);
+ Log3 $me, 4, "Stucture attr $type: $ret" if($ret);
return undef;
}
diff --git a/fhem/FHEM/98_telnet.pm b/fhem/FHEM/98_telnet.pm
index 93efdd39a..25dffc6fd 100644
--- a/fhem/FHEM/98_telnet.pm
+++ b/fhem/FHEM/98_telnet.pm
@@ -20,7 +20,7 @@ telnet_Initialize($)
$hash->{UndefFn} = "telnet_Undef";
$hash->{AttrFn} = "telnet_Attr";
$hash->{NotifyFn}= "telnet_SecurityCheck";
- $hash->{AttrList} = "loglevel:0,1,2,3,4,5,6 globalpassword password ".
+ $hash->{AttrList} = "globalpassword password ".
"allowfrom SSL connectTimeout connectInterval ".
"encoding:utf8,latin1";
$hash->{ActivateInformFn} = "telnet_ActivateInform";
@@ -80,7 +80,7 @@ telnet_ClientConnect($)
$hash->{DEF} =~ m/^(IPV6:)?(.*):(\d+)$/;
my ($isIPv6, $server, $port) = ($1, $2, $3);
- Log GetLogLevel($name,4), "$name: Connecting to $server:$port...";
+ Log3 $name, 4, "$name: Connecting to $server:$port...";
my @opts = (
PeerAddr => "$server:$port",
Timeout => AttrVal($name, "connectTimeout", 2),
@@ -100,7 +100,7 @@ telnet_ClientConnect($)
$selectlist{$name} = $hash;
$hash->{STATE} = "Connected";
RemoveInternalTimer($hash);
- Log(GetLogLevel($name,3), "$name: connected to $server:$port");
+ Log3 $name, 3, "$name: connected to $server:$port";
} else {
telnet_ClientDisconnect($hash, 1);
@@ -122,9 +122,9 @@ telnet_ClientDisconnect($$)
InternalTimer(gettimeofday()+AttrVal($name, "connectInterval", 60),
"telnet_ClientConnect", $hash, 0);
if($connect) {
- Log GetLogLevel($name,4), "$name: Connect failed.";
+ Log3 $name, 4, "$name: Connect failed.";
} else {
- Log GetLogLevel($name,3), "$name: Disconnected";
+ Log3 $name, 3, "$name: Disconnected";
}
}
@@ -150,7 +150,7 @@ telnet_Define($$$)
if($isServer) {
my $ret = TcpServer_Open($hash, $port, $global);
if($ret && !$init_done) {
- Log 1, "$ret. Exiting.";
+ Log3 $name, 1, "$ret. Exiting.";
exit(1);
}
return $ret;
@@ -233,7 +233,7 @@ telnet_Read($)
if($pw =~ m/^{.*}$/) { # Expression as pw
my $password = $cmd;
$ret = eval $pw;
- Log 1, "password expression: $@" if($@);
+ Log3 $name, 1, "password expression: $@" if($@);
}
if($ret) {
@@ -313,7 +313,7 @@ telnet_Attr(@)
TcpServer_SetSSL($hash);
if($hash->{CD}) {
my $ret = IO::Socket::SSL->start_SSL($hash->{CD});
- Log 1, "$hash->{NAME} start_SSL: $ret" if($ret);
+ Log3 $a[1], 1, "$hash->{NAME} start_SSL: $ret" if($ret);
}
}
return undef;
@@ -402,9 +402,6 @@ telnet_ActivateInform($)
Attributes:
-
-
Specify a password, which has to be entered as the very first string
diff --git a/fhem/FHEM/98_weblink.pm b/fhem/FHEM/98_weblink.pm
index 62536b93b..6f7944c1c 100755
--- a/fhem/FHEM/98_weblink.pm
+++ b/fhem/FHEM/98_weblink.pm
@@ -37,7 +37,7 @@ weblink_Define($$)
}
if($wltype eq "fileplot" || $wltype eq "dbplot") {
- Log 1, "Converting weblink $name ($wltype) to SVG";
+ Log3 $name, 1, "Converting weblink $name ($wltype) to SVG";
my $newm = LoadModule("SVG");
return "Cannot load module SVG" if($newm eq "UNDEFINED");
$hash->{TYPE} = "SVG";
diff --git a/fhem/FHEM/99_SUNRISE_EL.pm b/fhem/FHEM/99_SUNRISE_EL.pm
index a5de9fcfe..cc94d631e 100755
--- a/fhem/FHEM/99_SUNRISE_EL.pm
+++ b/fhem/FHEM/99_SUNRISE_EL.pm
@@ -78,7 +78,7 @@ sr_alt($$$$$$$)
# default
$long = AttrVal("global", "longitude", "8.686");
$lat = AttrVal("global", "latitude", "50.112");
- Log 5, "Compute sunrise/sunset for latitude $lat , longitude $long";
+ Log3 undef, 5, "Compute sunrise/sunset for latitude $lat , longitude $long";
my $nt = time;
diff --git a/fhem/FHEM/DevIo.pm b/fhem/FHEM/DevIo.pm
index 970e443c5..50b7d886f 100644
--- a/fhem/FHEM/DevIo.pm
+++ b/fhem/FHEM/DevIo.pm
@@ -104,7 +104,7 @@ DevIo_OpenDev($$$)
($dev, $baudrate) = split("@", $dev);
$hash->{PARTIAL} = "";
- Log 3, "Opening $name device $dev"
+ Log3 $name, 3, "Opening $name device $dev"
if(!$reopen);
if($dev =~ m/^UNIX:(SEQPACKET|STREAM):(.*)$/) { # FBAHA
@@ -116,12 +116,12 @@ DevIo_OpenDev($$$)
Type=>($type eq "STREAM" ? SOCK_STREAM:SOCK_SEQPACKET), Peer=>$fname);
};
if($@) {
- Log 1, $@;
+ Log3 $name, 1, $@;
return $@;
}
if(!$conn) {
- Log(3, "Can't connect to $dev: $!") if(!$reopen);
+ Log3 $name, 3, "Can't connect to $dev: $!" if(!$reopen);
$readyfnlist{"$name.$dev"} = $hash;
$hash->{STATE} = "disconnected";
return "";
@@ -147,7 +147,7 @@ DevIo_OpenDev($$$)
delete($hash->{NEXT_OPEN})
} else {
- Log(3, "Can't connect to $dev: $!") if(!$reopen);
+ Log3 $name, 3, "Can't connect to $dev: $!") if(!$reopen);
$readyfnlist{"$name.$dev"} = $hash;
$hash->{STATE} = "disconnected";
$hash->{NEXT_OPEN} = time()+60;
@@ -163,7 +163,7 @@ DevIo_OpenDev($$$)
if(!open($po, "+<$dev")) {
return undef if($reopen);
- Log(3, "Can't open $dev: $!");
+ Log3 $name, 3, "Can't open $dev: $!";
$readyfnlist{"$name.$dev"} = $hash;
$hash->{STATE} = "disconnected";
return "";
@@ -194,13 +194,13 @@ DevIo_OpenDev($$$)
}
}
if($@) {
- Log 1, $@;
+ Log3 $name, 1, $@;
return $@;
}
if(!$po) {
return undef if($reopen);
- Log(3, "Can't open $dev: $!");
+ Log3 $name, 3, "Can't open $dev: $!";
$readyfnlist{"$name.$dev"} = $hash;
$hash->{STATE} = "disconnected";
return "";
@@ -216,7 +216,7 @@ DevIo_OpenDev($$$)
if($baudrate) {
$po->reset_error();
- Log 3, "Setting $name baudrate to $baudrate";
+ Log3 $name, 3, "Setting $name baudrate to $baudrate";
$po->baudrate($baudrate);
$po->databits(8);
$po->parity('none');
@@ -248,9 +248,9 @@ DevIo_OpenDev($$$)
}
if($reopen) {
- Log 1, "$dev reappeared ($name)";
+ Log3 $name, 1, "$dev reappeared ($name)";
} else {
- Log 3, "$name device opened";
+ Log3 $name, 3, "$name device opened";
}
$hash->{STATE}="opened";
@@ -260,7 +260,7 @@ DevIo_OpenDev($$$)
my $ret = &$initfn($hash);
if($ret) {
DevIo_CloseDev($hash);
- Log 1, "Cannot init $dev, ignoring it";
+ Log3 $name, 1, "Cannot init $dev, ignoring it";
}
}
@@ -320,7 +320,7 @@ DevIo_Disconnected($)
return if(!defined($hash->{FD})); # Already deleted or RFR
- Log 1, "$dev disconnected, waiting to reappear";
+ Log3 $name, 1, "$dev disconnected, waiting to reappear";
DevIo_CloseDev($hash);
$readyfnlist{"$name.$dev"} = $hash; # Start polling
$hash->{STATE} = "disconnected";
diff --git a/fhem/FHEM/HttpUtils.pm b/fhem/FHEM/HttpUtils.pm
index 908c0fd2e..4f4c7adf4 100644
--- a/fhem/FHEM/HttpUtils.pm
+++ b/fhem/FHEM/HttpUtils.pm
@@ -66,7 +66,8 @@ CustomGetFileFromURL($$@)
my $displayurl= $quiet ? "
+
+
+ Set the verbosity level. Possible values:
+
+
+ The value for the global device is a default for
+ other devices without own verbose attribute set.
+
Add an arbitrary comment.
@@ -1244,20 +1259,6 @@ A line ending with \ will be concatenated with the next one, so long lines
(in order to prevent typos).
-
-
- Set the verbosity level. Possible values:
-
-
- Recommended level is 3 for normal use.
-
-
Define the timeout for which 2 identical events from two different
diff --git a/fhem/docs/commandref_frame_DE.html b/fhem/docs/commandref_frame_DE.html
index e879dd4a6..a5845d3df 100644
--- a/fhem/docs/commandref_frame_DE.html
+++ b/fhem/docs/commandref_frame_DE.html
@@ -331,36 +331,57 @@ Zeilen erstreckende Befehle, indem man keine \ am Zeilenende eingeben muss.
Attribute, die für alle Geräte anwendbar sind:
- Wenn dieses Attribut nicht gesetzt ist, wird der in der Gerätegruppe - gesetzte Gerätetyp verwendet.