mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
92_FileLog.pm: prefer REGEXP eq NAME over fakelog (Forum #122372)
git-svn-id: https://svn.fhem.de/fhem/trunk@24849 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c0dd7bf522
commit
49b2184cf2
@ -416,11 +416,12 @@ FileLog_Set($@)
|
|||||||
my ($hash, @a) = @_;
|
my ($hash, @a) = @_;
|
||||||
my $me = $hash->{NAME};
|
my $me = $hash->{NAME};
|
||||||
|
|
||||||
return undef if( $hash->{REGEXP} eq 'fakelog' );
|
|
||||||
|
|
||||||
return "no set argument specified" if(int(@a) < 2);
|
return "no set argument specified" if(int(@a) < 2);
|
||||||
my %sets = (reopen=>0, clear=>0, absorb=>1, addRegexpPart=>2,
|
my %sets = (reopen=>0, clear=>0, absorb=>1, addRegexpPart=>2,
|
||||||
removeRegexpPart=>1);
|
removeRegexpPart=>1);
|
||||||
|
%sets = (clear=>0) # 95351
|
||||||
|
if($hash->{REGEXP} eq 'fakelog' || # deprecated
|
||||||
|
$hash->{REGEXP} eq $me); # 122373
|
||||||
|
|
||||||
my $cmd = $a[1];
|
my $cmd = $a[1];
|
||||||
if(!defined($sets{$cmd})) {
|
if(!defined($sets{$cmd})) {
|
||||||
@ -558,7 +559,8 @@ FileLog_fhemwebFn($$$$)
|
|||||||
}
|
}
|
||||||
$ret .= "</table>";
|
$ret .= "</table>";
|
||||||
return $ret if($pageHash);
|
return $ret if($pageHash);
|
||||||
return $ret if( $defs{$d}{REGEXP} eq 'fakelog' );
|
return $ret if($defs{$d}{REGEXP} eq 'fakelog'); # deprecated
|
||||||
|
return $ret if($defs{$d}{REGEXP} eq $d);
|
||||||
|
|
||||||
# DETAIL only from here on
|
# DETAIL only from here on
|
||||||
my $hash = $defs{$d};
|
my $hash = $defs{$d};
|
||||||
|
@ -6,7 +6,7 @@ attr global statefile ./log/fhem.save
|
|||||||
define WEB FHEMWEB 8083 global
|
define WEB FHEMWEB 8083 global
|
||||||
|
|
||||||
# Fake FileLog entry, to access the fhem log from FHEMWEB
|
# Fake FileLog entry, to access the fhem log from FHEMWEB
|
||||||
define Logfile FileLog ./log/fhem-%Y-%m.log fakelog
|
define Logfile FileLog ./log/fhem-%Y-%m.log Logfile
|
||||||
|
|
||||||
define autocreate autocreate
|
define autocreate autocreate
|
||||||
attr autocreate filelog ./log/%NAME-%Y.log
|
attr autocreate filelog ./log/%NAME-%Y.log
|
||||||
|
Loading…
Reference in New Issue
Block a user