mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 01:09:47 +00:00
98_freezemon.pm: Unwrap Log3 when disabled
git-svn-id: https://svn.fhem.de/fhem/trunk@16534 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ee9a5d394d
commit
372dfd67fa
@ -22,6 +22,7 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Changelog:
|
# Changelog:
|
||||||
|
# 0.0.19: unwrap Log3 function when set inactive
|
||||||
# 0.0.18: fixed unnecessary call of blocking function
|
# 0.0.18: fixed unnecessary call of blocking function
|
||||||
# 0.0.17: fixed Warning when fm_logFile is not maintained
|
# 0.0.17: fixed Warning when fm_logFile is not maintained
|
||||||
# Freeze-Handling non-blocking
|
# Freeze-Handling non-blocking
|
||||||
@ -85,7 +86,7 @@ use Time::HiRes qw(tv_interval);
|
|||||||
use B qw(svref_2object);
|
use B qw(svref_2object);
|
||||||
use Blocking;
|
use Blocking;
|
||||||
|
|
||||||
my $version = "0.0.18";
|
my $version = "0.0.19";
|
||||||
my @logqueue = ();
|
my @logqueue = ();
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
@ -438,6 +439,9 @@ sub freezemon_Set($@) {
|
|||||||
RemoveInternalTimer($hash);
|
RemoveInternalTimer($hash);
|
||||||
readingsSingleUpdate( $hash, "state", "inactive", 1 );
|
readingsSingleUpdate( $hash, "state", "inactive", 1 );
|
||||||
$hash->{helper}{DISABLED} = 1;
|
$hash->{helper}{DISABLED} = 1;
|
||||||
|
my $status = Log3( "", 100, "" );
|
||||||
|
Log3( "", 0, "[Freezemon] $name: Unwrapping Log3" );
|
||||||
|
*main::Log3 = $hash->{helper}{Log3};
|
||||||
}
|
}
|
||||||
elsif ( $cmd eq "active" ) {
|
elsif ( $cmd eq "active" ) {
|
||||||
if ( IsDisabled($name) ) {
|
if ( IsDisabled($name) ) {
|
||||||
@ -594,6 +598,9 @@ sub freezemon_Attr($) {
|
|||||||
RemoveInternalTimer($hash);
|
RemoveInternalTimer($hash);
|
||||||
readingsSingleUpdate( $hash, "state", "inactive", 1 );
|
readingsSingleUpdate( $hash, "state", "inactive", 1 );
|
||||||
$hash->{helper}{DISABLED} = 1;
|
$hash->{helper}{DISABLED} = 1;
|
||||||
|
my $status = Log3( "", 100, "" );
|
||||||
|
Log3( "", 0, "[Freezemon] $name: Unwrapping Log3" );
|
||||||
|
*main::Log3 = $hash->{helper}{Log3};
|
||||||
}
|
}
|
||||||
elsif ( $aVal == 0 ) {
|
elsif ( $aVal == 0 ) {
|
||||||
freezemon_start($hash);
|
freezemon_start($hash);
|
||||||
|
Loading…
Reference in New Issue
Block a user