mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 03:44:52 +00:00
93_DbRep: executeBefore/AfterProc output: set verbose level to 3
git-svn-id: https://svn.fhem.de/fhem/trunk@28660 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7c55e4ad90
commit
b59af79343
@ -1,5 +1,6 @@
|
||||
# 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.
|
||||
- change: 93_DbRep: executeBefore/AfterProc output: set verbose level to 3
|
||||
- change: 76_SolarForecast: minor code changes ones more
|
||||
- bufgix: 72_FRITZBOX: Fehlerbehandlung verbessert
|
||||
- change: 72_FRITZBOX: commandRef ergänzt
|
||||
|
@ -59,6 +59,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
||||
|
||||
# Version History intern
|
||||
my %DbRep_vNotesIntern = (
|
||||
"8.53.6" => "15.03.2024 change verbose level of DbRep_beforeproc, DbRep_afterproc to 3 ",
|
||||
"8.53.5" => "11.03.2024 some changes for MariaDB Perl driver usage, change DbRep_dbConnect".
|
||||
"support compression between client and server ",
|
||||
"8.53.4" => "09.03.2024 Ready for support of MariaDB Perl driver ",
|
||||
@ -12644,16 +12645,16 @@ sub DbRep_beforeproc {
|
||||
my $name = $hash->{NAME};
|
||||
my $fn = AttrVal($name, 'executeBeforeProc', '');
|
||||
|
||||
if($fn) {
|
||||
if ($fn) {
|
||||
Log3 ($name, 3, "DbRep $name - execute command before $cmd: '$fn' ");
|
||||
|
||||
my $err = _DbRep_procCode ($hash, $fn);
|
||||
my $msg = _DbRep_procCode ($hash, $fn);
|
||||
|
||||
if ($err) {
|
||||
Log3 ($name, 2, "DbRep $name - command message before $cmd: \"$err\" ");
|
||||
if ($msg) {
|
||||
Log3 ($name, 3, "DbRep $name - command message before $cmd: \"$msg\" ");
|
||||
my $erread = "Warning - message from command before $cmd appeared";
|
||||
|
||||
ReadingsSingleUpdateValue ($hash, "before_".$cmd."_message", $err, 1);
|
||||
ReadingsSingleUpdateValue ($hash, "before_".$cmd."_message", $msg, 1);
|
||||
ReadingsSingleUpdateValue ($hash, "state", $erread, 1);
|
||||
}
|
||||
}
|
||||
@ -12669,24 +12670,22 @@ sub DbRep_afterproc {
|
||||
my $cmd = shift // q{process};
|
||||
my $bfile = shift // q{};
|
||||
|
||||
my ($err,$erread);
|
||||
my $name = $hash->{NAME};
|
||||
$cmd = (split " ", $cmd)[0];
|
||||
my $sval = ReadingsVal ($name, 'state', '');
|
||||
my $fn = AttrVal ($name, 'executeAfterProc', '');
|
||||
|
||||
my $name = $hash->{NAME};
|
||||
$cmd = (split " ", $cmd)[0];
|
||||
my $sval = ReadingsVal ($name, 'state', '');
|
||||
my $fn = AttrVal ($name, 'executeAfterProc', '');
|
||||
|
||||
if($fn) {
|
||||
if ($fn) {
|
||||
Log3 ($name, 3, "DbRep $name - execute command after $cmd: '$fn' ");
|
||||
|
||||
$err = _DbRep_procCode ($hash, $fn);
|
||||
my $msg = _DbRep_procCode ($hash, $fn);
|
||||
|
||||
if ($err) {
|
||||
Log3 ($name, 2, qq{DbRep $name - command message after $cmd: >$err<});
|
||||
if ($msg) {
|
||||
Log3 ($name, 3, qq{DbRep $name - command message after $cmd: >$msg<});
|
||||
|
||||
$erread = $sval eq 'error' ? $sval : qq(WARNING - $cmd finished, but message after command appeared);
|
||||
my $erread = $sval eq 'error' ? $sval : qq(WARNING - $cmd finished, but message after command appeared);
|
||||
|
||||
ReadingsSingleUpdateValue ($hash, 'after_'.$cmd.'_message', $err, 1);
|
||||
ReadingsSingleUpdateValue ($hash, 'after_'.$cmd.'_message', $msg, 1);
|
||||
ReadingsSingleUpdateValue ($hash, 'state', $erread, 1);
|
||||
|
||||
return $erread;
|
||||
|
Loading…
x
Reference in New Issue
Block a user