diff --git a/lib/global-state/source/update.php b/lib/global-state/source/update.php index 13688e7..effb34c 100755 --- a/lib/global-state/source/update.php +++ b/lib/global-state/source/update.php @@ -17,7 +17,7 @@ /* (2) Manage errors */ if( $f_gstate === false ){ - slog('Cannot access GLOBAL STATE file', 'global-state:update'); + slog('Cannot access GLOBAL STATE file', 'global-state:update', 'daemon'); return 127; } @@ -38,7 +38,7 @@ /* (2) Section Title */ if( $f_cstates === false ){ - slog('Cannot access GLOBAL/CHIP STATES file', 'global-state:update'); + slog('Cannot access GLOBAL/CHIP STATES file', 'global-state:update', 'daemon'); return 127; } @@ -65,12 +65,12 @@ $failed = true; break; } - + } // {4} If not failed -> state to keep // if( !$failed ){ - slog("Current state '$GLOBAL_STATE' matches '{$parsed[0]}'", 'global-state:update'); + slog("Current state '$GLOBAL_STATE' matches '{$parsed[0]}'", 'global-state:update', 'daemon'); $CHIP_STATE = $parsed[1]; break; } @@ -79,7 +79,7 @@ /* (4) If no CHIP_STATE set -> abort */ if( is_null($CHIP_STATE) ){ - slog("Cannot find a chip_state for the current global state '{$GLOBAL_STATE}'", 'global-state'); + slog("Cannot find a chip_state for the current global state '{$GLOBAL_STATE}'", 'global-state', 'daemon'); return 127; } @@ -121,7 +121,7 @@ /* (4) If error */ if( $updated === false ) - slog("Cannot set ${position} chip to state {$state}", 'global-state:update'); + slog("Cannot set ${position} chip to state {$state}", 'global-state:update', 'daemon'); } }