IPSLogger - mein kleiner feiner LogHandler für IPS

Hi,

wie führe ich idealerweise ein Update auf die 2.5er Version durch??? Einfach die Scripte drüberkopieren und das Install-Skript erneut ausführen??? Vorher im Objektbaum und im Scripte-Ordner die zugehörigen Sachen löschen oder nicht??? Irgend welche Dateien öffnen und bereinigen???

Gleiches gilt für:

  • IPSInstaller
  • IPSTwilight
  • IPSWatering

Gruß Proxima

IPSLogger
ersetzen von IPSLogger_Output.ips.php

IPSTwillight
ersetzen von IPSTwillight.ips.php

IPSWatering
ersetzen von IPSWatering_Logging.ips.php

IPSShadowing
ersetzen von IPSShadowing_Movement.ips.php

Erneute Installation ist nicht erforderlich.

Arbeite gerade an einem verbesserten Update Mechanismus - wird also in Zukunft einfacher werden.

Hallo,

sollte ich zuerst das Update auf IPS 2.5 machen und anschliessend die php-Files austauschen oder umgekehrt ???

Gruß Proxima

Zuerst die Files austauschen .

Noch einfacher als einfach eine Datei zu ersetzen :wink:

Übrigens super Skripte von Dir!!! Danke

Grüße

Andreas

Hallo,

habe im Logger- ChangeSettings Skript div. Fehlermeldungen (siehe Screenshot).
Vielleicht weis jemand Rat ??? :confused:

Gruß Proxima

Du darfst das Skript nicht durch Ausführen starten. Es muss getriggert werden.

Hallo,

heute habe ich versucht den IPSLogger zu installieren.
Habe mich an die Doku im Wiki gehalten.

Leider stolpere ich hier an mehreren Stellen:

*Widget konfigurieren: WefFront Konfiguration – Element hinzufügen, Element=Widget, Variable=SingleOutMsg, BeiClick=IPSLogger_ClearSingleOut

=> geht offensichtlich erst mit der Professional Lizenz, geht es ohne und wenn ja, wie?

  • PHP ErrorHandler einrichten: Folgende Zeile in die Datei „__autoinclude.inc.php“ im scripts Verzeichnis von IP-Symcon hinzufügen.

=> Die Datei gibt es nicht bei mir. Soll ich die einfach anlegen?

Beim Aufruf des Skripts erhalte ich die Meldung: „Dieses Skript wurde als ‚fehlerhaft‘ markiert. Bitte beheben Sie alle Fehler!“. Welche denn?

Am Ende seiner Fahnenstange angekommen.

Mfg
Marc

  • PHP ErrorHandler einrichten: Folgende Zeile in die Datei „__autoinclude.inc.php“ im scripts Verzeichnis von IP-Symcon hinzufügen.

Erst ab IPS V2.5.

Vor 2.5 wird der ErrorHandler so eingerichtet:
Folgende Zeile in die Datei php.ini im IPS Root Verzeichnis hinzufügen. auto_prepend_file=„C:\IP-Symcon\scripts\IPSLogger_PhpErrorHandler.ips.php“.

Mit dem Widget bin ich mir auch nicht sicher ob das in der Basic Version geht.

Beim Aufruf des Skripts erhalte ich die Meldung: „Dieses Skript wurde als ‚fehlerhaft‘ markiert. Bitte beheben Sie alle Fehler!“. Welche denn?

Welches Script hast Du aufgerufen?
Der Logger sollte prinzipiell auch ohne Widget und Php Error Handler funktionieren.

Das Installationsskript:

<?
	include_once "IPSInstaller.ips.php";
	include_once "IPSLogger_Configuration.ips.php";

	// --------------------------------------------------------------------------
	// WebFront Configuration
	// --------------------------------------------------------------------------
	define ("c_Program_Path",					"Program.IPSLogger");

	define ("c_WebFront_Path",					"WebFront.System.Logging");
	define ("c_WebFront_ConfigId",			19332);
	define ("c_WebFront_TabPaneParent",		'roottp');
	define ("c_WebFront_TabPaneOrderId",	60);
	define ("c_WebFront_TabPaneName",		'');
	define ("c_WebFront_TabPaneIcon",		'Window');

	define ("c_iPhone_Path",					"");

	// ----------------------------------------------------------------------------------------------------------------------------
	// Program Installation
	// ----------------------------------------------------------------------------------------------------------------------------
	$ID_IPSLoggerCategory = CreateCategoryPath(c_Program_Path);
	$ID_IPSLoggerInstance = CreateDummyInstance("IPSLogger", $ID_IPSLoggerCategory, 0);

	CreateProfiles();

	// Add IPSLogger Scripts
   $ID_ScriptIPSLogger                = CreateScript('IPSLogger',                 'IPSLogger.ips.php',                 $ID_IPSLoggerCategory,  10);
   $ID_ScriptIPSLoggerConstants       = CreateScript('IPSLogger_Constants',       'IPSLogger_Constants.ips.php',       $ID_IPSLoggerCategory,  20);
   $ID_ScriptIPSLoggerConfiguration   = CreateScript('IPSLogger_Configuration',   'IPSLogger_Configuration.ips.php',   $ID_IPSLoggerCategory,  30);
   $ID_ScriptIPSLoggerOutput          = CreateScript('IPSLogger_Output',          'IPSLogger_Output.ips.php',          $ID_IPSLoggerCategory,  40);
   $ID_ScriptIPSLoggerChangeSettings  = CreateScript('IPSLogger_ChangeSettings',  'IPSLogger_ChangeSettings.ips.php',  $ID_IPSLoggerCategory,  50);
   $ID_ScriptIPSLoggerSendMail        = CreateScript('IPSLogger_SendMail',        'IPSLogger_SendMail.ips.php',        $ID_IPSLoggerCategory,  60);
   $ID_ScriptIPSLoggerClearSingleOut  = CreateScript('IPSLogger_ClearSingleOut',  'IPSLogger_ClearSingleOut.ips.php',  $ID_IPSLoggerCategory,  70);
   $ID_ScriptIPSLoggerClearHtmlOut    = CreateScript('IPSLogger_ClearHtmlOut',    'IPSLogger_ClearHtmlOut.ips.php',    $ID_IPSLoggerCategory,  80);
   $ID_ScriptIPSLoggerPurgeLogFiles   = CreateScript('IPSLogger_PurgeLogFiles',   'IPSLogger_PurgeLogFiles.ips.php',   $ID_IPSLoggerCategory,  90);
   $ID_ScriptIPSLoggerPhpErrorHandler = CreateScript('IPSLogger_PhpErrorHandler', 'IPSLogger_PhpErrorHandler.ips.php', $ID_IPSLoggerCategory, 100);

	CreateTimer ('IPSLogger_PurgeLogFilesTimer', $ID_ScriptIPSLoggerPurgeLogFiles, 8);

	// Add IPSLogger Variables
	$ID_SingleOutEnabled  = CreateVariable('SingleOut_Enabled',  0 /*Boolean*/, $ID_IPSLoggerInstance, 100, '~Switch',            $ID_ScriptIPSLoggerChangeSettings, true,        'Power');
	$ID_SingleOutLevel    = CreateVariable('SingleOut_Level',    1 /*Integer*/, $ID_IPSLoggerInstance, 110, 'IPSLogger_Level',    $ID_ScriptIPSLoggerChangeSettings, 1 /*Error*/, 'Intensity');
	$ID_SingleOutMsg      = CreateVariable('SingleOut_Msg',      3 /*String*/,  $ID_IPSLoggerInstance, 120, '~HTMLBox',           null, ""  ,                                     'Window');
	$ID_HtmlOutEnabled    = CreateVariable('HtmlOut_Enabled',    0 /*Boolean*/, $ID_IPSLoggerInstance, 200, '~Switch',            $ID_ScriptIPSLoggerChangeSettings, true,        'Power');
	$ID_HtmlOutLevel      = CreateVariable('HtmlOut_Level',      1 /*Integer*/, $ID_IPSLoggerInstance, 210, 'IPSLogger_Level',    $ID_ScriptIPSLoggerChangeSettings, 9 /*All*/,   'Intensity');
	$ID_HtmlOutMsgCount   = CreateVariable('HtmlOut_MsgCount',   1 /*Integer*/, $ID_IPSLoggerInstance, 220, 'IPSLogger_MsgCount', $ID_ScriptIPSLoggerChangeSettings, 20,          'Distance');
	$ID_HtmlOutMsgId      = CreateVariable('HtmlOut_MsgId',      1 /*Integer*/, $ID_IPSLoggerInstance, 230, 'IPSLogger_MsgId',    null, 0,                                        'Repeat');
	$ID_HtmlOutMsgList    = CreateVariable('HtmlOut_MsgList',    3 /*String*/,  $ID_IPSLoggerInstance, 240, '~HTMLBox',           null,  "",                                      'Window');
	$ID_IPSOutEnabled     = CreateVariable('IPSOut_Enabled',     0 /*Boolean*/, $ID_IPSLoggerInstance, 300, '~Switch',            $ID_ScriptIPSLoggerChangeSettings, true,        'Power');
	$ID_IPSOutLevel       = CreateVariable('IPSOut_Level',       1 /*Integer*/, $ID_IPSLoggerInstance, 310, 'IPSLogger_Level',    $ID_ScriptIPSLoggerChangeSettings, 5 /*Debug*/, 'Intensity');
	$ID_FileOutEnabled    = CreateVariable('FileOut_Enabled',    0 /*Boolean*/, $ID_IPSLoggerInstance, 400, '~Switch',            $ID_ScriptIPSLoggerChangeSettings, false,       'Power');
	$ID_FileOutLevel      = CreateVariable('FileOut_Level',      1 /*Integer*/, $ID_IPSLoggerInstance, 410, 'IPSLogger_Level',    $ID_ScriptIPSLoggerChangeSettings, 5 /*Debug*/, 'Intensity');
	$ID_FileOutDays       = CreateVariable('FileOut_Days',       1 /*Integer*/, $ID_IPSLoggerInstance, 420, 'IPSLogger_Days',     $ID_ScriptIPSLoggerChangeSettings, 1,           'Repeat');
	$ID_Log4IPSOutEnabled = CreateVariable('Log4IPSOut_Enabled', 0 /*Boolean*/, $ID_IPSLoggerInstance, 500, '~Switch',            $ID_ScriptIPSLoggerChangeSettings, true,        'Power');
	$ID_Log4IPSOutLevel   = CreateVariable('Log4IPSOut_Level',   1 /*Integer*/, $ID_IPSLoggerInstance, 510, 'IPSLogger_Level',    $ID_ScriptIPSLoggerChangeSettings, 5 /*Debug*/, 'Intensity');
	$ID_Log4IPSOutDays    = CreateVariable('Log4IPSOut_Days',    1 /*Integer*/, $ID_IPSLoggerInstance, 520, 'IPSLogger_Days',     $ID_ScriptIPSLoggerChangeSettings, 1,           'Repeat');
	$ID_EMailOutEnabled   = CreateVariable('EMailOut_Enabled',   0 /*Boolean*/, $ID_IPSLoggerInstance, 600, '~Switch',            $ID_ScriptIPSLoggerChangeSettings, false,       'Power');
	$ID_EMailOutLevel     = CreateVariable('EMailOut_Level',     1 /*Integer*/, $ID_IPSLoggerInstance, 610, 'IPSLogger_Level',    $ID_ScriptIPSLoggerChangeSettings, 5 /*Debug*/, 'Intensity');
	$ID_EMailOutPriority  = CreateVariable('EMailOut_Priority',  1 /*Integer*/, $ID_IPSLoggerInstance, 620, 'IPSLogger_Priority', $ID_ScriptIPSLoggerChangeSettings, 0,           'Return');
	$ID_EMailOutSendDelay = CreateVariable('EMailOut_SendDelay', 1 /*Integer*/, $ID_IPSLoggerInstance, 630, 'IPSLogger_Delay',    $ID_ScriptIPSLoggerChangeSettings, 5,           'LockClosed');
	$ID_EMailOutMsgList   = CreateVariable('EMailOut_MsgList',   3 /*String*/,  $ID_IPSLoggerInstance, 640, '~TextBox',           null, "",                                       'Mail');
	$ID_EchoOutEnabled    = CreateVariable('EchoSOut_Enabled',   0 /*Boolean*/, $ID_IPSLoggerInstance, 700, '~Switch',            $ID_ScriptIPSLoggerChangeSettings, false,       'Power');
	$ID_EchoOutLevel      = CreateVariable('EchoOut_Level',      1 /*Integer*/, $ID_IPSLoggerInstance, 710, 'IPSLogger_Level',    $ID_ScriptIPSLoggerChangeSettings, 9 /*All*/,   'Intensity');
	$ID_ProwlOutEnabled   = CreateVariable('ProwlOut_Enabled',   0 /*Boolean*/, $ID_IPSLoggerInstance, 800, '~Switch',            $ID_ScriptIPSLoggerChangeSettings, false,       'Power');
	$ID_ProwlOutLevel     = CreateVariable('ProwlOut_Level',     1 /*Integer*/, $ID_IPSLoggerInstance, 810, 'IPSLogger_Level',    $ID_ScriptIPSLoggerChangeSettings, 1 /*Error*/, 'Intensity');
	$ID_ProwlOutPriority  = CreateVariable('ProwlOut_Priority',  1 /*Integer*/, $ID_IPSLoggerInstance, 820, 'IPSLogger_Priority', $ID_ScriptIPSLoggerChangeSettings, 0,           'Return');

	SetVariableConstant ("c_ID_SingleOutEnabled",   $ID_SingleOutEnabled, 'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_SingleOutLevel",     $ID_SingleOutLevel,   'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_SingleOutMsg",       $ID_SingleOutMsg,     'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_HtmlOutEnabled",     $ID_HtmlOutEnabled,   'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_HtmlOutLevel",       $ID_HtmlOutLevel,     'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_HtmlOutMsgCount",    $ID_HtmlOutMsgCount,  'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_HtmlOutMsgId",       $ID_HtmlOutMsgId,     'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_HtmlOutMsgList",     $ID_HtmlOutMsgList,   'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_IPSOutEnabled",      $ID_IPSOutEnabled,    'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_IPSOutLevel",        $ID_IPSOutLevel,      'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_EMailOutEnabled",    $ID_EMailOutEnabled,  'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_EMailOutLevel",      $ID_EMailOutLevel,    'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_EMailOutPriority",   $ID_EMailOutPriority, 'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_EMailOutDelay",      $ID_EMailOutSendDelay,'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_EMailOutMsgList",    $ID_EMailOutMsgList,  'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_FileOutEnabled",     $ID_FileOutEnabled,   'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_FileOutLevel",       $ID_FileOutLevel,     'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_FileOutDays",        $ID_FileOutDays,      'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_Log4IPSOutEnabled",  $ID_Log4IPSOutEnabled,'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_Log4IPSOutLevel",    $ID_Log4IPSOutLevel,  'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_Log4IPSOutDays",     $ID_Log4IPSOutDays,   'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_ScriptSendMail",     $ID_ScriptIPSLoggerSendMail, 'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_ScriptPurgeLogFiles",$ID_ScriptIPSLoggerPurgeLogFiles, 'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_EchoOutEnabled",     $ID_EchoOutEnabled,   'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_EchoOutLevel",       $ID_EchoOutLevel,     'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_ProwlOutEnabled",    $ID_ProwlOutEnabled,  'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_ProwlOutLevel",      $ID_ProwlOutLevel,    'IPSLogger_Constants.ips.php');
	SetVariableConstant ("c_ID_ProwlOutPriority",   $ID_ProwlOutPriority, 'IPSLogger_Constants.ips.php');

	// ----------------------------------------------------------------------------------------------------------------------------
	// Webfront Installation
	// ----------------------------------------------------------------------------------------------------------------------------
	$ID_CategoryWebFront         = CreateCategoryPath(c_WebFront_Path);
	$ID_CategoryOutput           = CreateCategory('Output',    $ID_CategoryWebFront, 10);
	$ID_CategorySettings         = CreateCategory('Settings',  $ID_CategoryWebFront, 20);
	$ID_CategorySettingsWidget   = CreateCategory(  'Widget',  $ID_CategorySettings, 200);
	$ID_CategorySettingsWebFront = CreateCategory(  'WebFront',$ID_CategorySettings, 300);
	$ID_CategorySettingsIPS      = CreateCategory(  'IPS',     $ID_CategorySettings, 400);
	$ID_CategorySettingsFile     = CreateCategory(  'File',    $ID_CategorySettings, 500);
	$ID_CategorySettingsLog4IPS  = CreateCategory(  'Log4IPS', $ID_CategorySettings, 600);
	$ID_CategorySettingsEMail    = CreateCategory(  'EMail',   $ID_CategorySettings, 700);
	$ID_CategorySettingsProwl    = CreateCategory(  'Prowl',   $ID_CategorySettings, 800);

	DeleteWFCItems(c_WebFront_ConfigId, 'SystemTP');
	CreateWFCItemTabPane   (c_WebFront_ConfigId, 'SystemTP',             c_WebFront_TabPaneParent, c_WebFront_TabPaneOrderId, c_WebFront_TabPaneName, c_WebFront_TabPaneIcon);
	CreateWFCItemCategory  (c_WebFront_ConfigId, 'SystemTP_LogWindow'.date('Hi'),   'SystemTP',  10, 'Logging', 'Window', $ID_CategoryOutput /*BaseId*/, 'false' /*BarBottomVisible*/);
	CreateWFCItemCategory  (c_WebFront_ConfigId, 'SystemTP_LogSettings'.date('Hi'), 'SystemTP',  20, 'Log Settings','Gear',   $ID_CategorySettings /*BaseId*/, 'true' /*BarBottomVisible*/);

	// Output Window
	CreateLink('Logging Window',   $ID_HtmlOutMsgList,    $ID_CategoryOutput, 10);

	// Output Overview
	CreateLink('Output Widget',    $ID_SingleOutEnabled,  $ID_CategorySettings, 10);
	CreateLink('Output WebFront',  $ID_HtmlOutEnabled,    $ID_CategorySettings, 20);
	CreateLink('Output IPS',       $ID_IPSOutEnabled,     $ID_CategorySettings, 30);
	CreateLink('Output File',      $ID_FileOutEnabled,    $ID_CategorySettings, 40);
	CreateLink('Output Log4IPS',   $ID_Log4IPSOutEnabled, $ID_CategorySettings, 50);
	CreateLink('Output EMail',     $ID_EMailOutEnabled,   $ID_CategorySettings, 60);
	CreateLink('Output Echo',      $ID_EchoOutEnabled,    $ID_CategorySettings, 70);
	CreateLink('Output Prowl',     $ID_ProwlOutEnabled,   $ID_CategorySettings, 80);

	// Output Detail
	CreateLink('Output Enabled',   $ID_SingleOutEnabled,             $ID_CategorySettingsWidget,   10);
	CreateLink('Logging Level',    $ID_SingleOutLevel,               $ID_CategorySettingsWidget,   20);
	CreateLink('Last Message',     $ID_SingleOutMsg,                 $ID_CategorySettingsWidget,   30);
	CreateLink('Clear Message',    $ID_ScriptIPSLoggerClearSingleOut,$ID_CategorySettingsWidget,   40);
	CreateLink('Output Enabled',   $ID_HtmlOutEnabled,               $ID_CategorySettingsWebFront, 10);
	CreateLink('Logging Level',    $ID_HtmlOutLevel,                 $ID_CategorySettingsWebFront, 20);
	CreateLink('Message Count',    $ID_HtmlOutMsgCount,              $ID_CategorySettingsWebFront, 30);
	CreateLink('Last MessageID',   $ID_HtmlOutMsgId,                 $ID_CategorySettingsWebFront, 40);
	CreateLink('Clear Output',     $ID_ScriptIPSLoggerClearHtmlOut,  $ID_CategorySettingsWebFront, 50);
	CreateLink('Message List',     $ID_HtmlOutMsgList,               $ID_CategorySettingsWebFront, 60);
	CreateLink('Output Enabled',   $ID_IPSOutEnabled,                $ID_CategorySettingsIPS,      10);
	CreateLink('Logging Level',    $ID_IPSOutLevel,                  $ID_CategorySettingsIPS,      20);
	CreateLink('Output Enabled',   $ID_FileOutEnabled,               $ID_CategorySettingsFile,     10);
	CreateLink('Logging Level',    $ID_FileOutLevel,                 $ID_CategorySettingsFile,     20);
	CreateLink('Purge Files after',$ID_FileOutDays,                  $ID_CategorySettingsFile,     30);
	CreateLink('Execute Purge',    $ID_ScriptIPSLoggerPurgeLogFiles, $ID_CategorySettingsFile,     40);
	CreateLink('Output Enabled',   $ID_Log4IPSOutEnabled,            $ID_CategorySettingsLog4IPS,  10);
	CreateLink('Logging Level',    $ID_Log4IPSOutLevel,              $ID_CategorySettingsLog4IPS,  20);
	CreateLink('Purge Files after',$ID_Log4IPSOutDays,               $ID_CategorySettingsLog4IPS,  30);
	CreateLink('Execute Purge',    $ID_ScriptIPSLoggerPurgeLogFiles, $ID_CategorySettingsLog4IPS,  40);
	CreateLink('Output Enabled',   $ID_EMailOutEnabled,              $ID_CategorySettingsEMail,    10);
	CreateLink('Logging Level',    $ID_EMailOutLevel,                $ID_CategorySettingsEMail,    20);
	CreateLink('Priority',         $ID_EMailOutPriority,             $ID_CategorySettingsEMail,    30);
	CreateLink('Send Delay',       $ID_EMailOutSendDelay,            $ID_CategorySettingsEMail,    40);
	CreateLink('Message List',     $ID_EMailOutMsgList,              $ID_CategorySettingsEMail,    50);
	CreateLink('Output Enabled',   $ID_ProwlOutEnabled,              $ID_CategorySettingsProwl,    10);
	CreateLink('Logging Level',    $ID_ProwlOutLevel,                $ID_CategorySettingsProwl,    20);
	CreateLink('Priority',         $ID_ProwlOutPriority,             $ID_CategorySettingsProwl,    30);

	// ----------------------------------------------------------------------------------------------------------------------------
	// iPhone Installation
	// ----------------------------------------------------------------------------------------------------------------------------
	if (c_iPhone_Path <> "") {
		$ID_CategoryiPhone    = CreateCategoryPath(c_iPhone_Path, c_WebFront_TabPaneOrderId, 'Window');
		CreateLink('Logging Window',   $ID_HtmlOutMsgList,    $ID_CategoryiPhone, 10);
		$ID_CategoryiPhone    = CreateCategoryPath(c_iPhone_Path.'.Logging Settings', 20, 'Gear');

		$ID_Output = CreateDummyInstance("Widget", $ID_CategoryiPhone, 100);
		CreateLink('Output Enabled',   $ID_SingleOutEnabled,             $ID_Output,   10);
		CreateLink('Logging Level',    $ID_SingleOutLevel,               $ID_Output,   20);
		CreateLink('Last Message',     $ID_SingleOutMsg,                 $ID_Output,   30);
		CreateLink('Clear Message',    $ID_ScriptIPSLoggerClearSingleOut,$ID_Output,   40);

		$ID_Output = CreateDummyInstance("WebFront", $ID_CategoryiPhone, 200);
		CreateLink('Output Enabled',   $ID_HtmlOutEnabled,               $ID_Output,   10);
		CreateLink('Logging Level',    $ID_HtmlOutLevel,                 $ID_Output,   20);
		CreateLink('Message Count',    $ID_HtmlOutMsgCount,              $ID_Output,   30);
		CreateLink('Clear Output',     $ID_ScriptIPSLoggerClearHtmlOut,  $ID_Output,   50);

		$ID_Output = CreateDummyInstance("IPS", $ID_CategoryiPhone, 300);
		CreateLink('Output Enabled',   $ID_IPSOutEnabled,                $ID_Output,   10);
		CreateLink('Logging Level',    $ID_IPSOutLevel,                  $ID_Output,   20);

		$ID_Output = CreateDummyInstance("LogFile", $ID_CategoryiPhone, 400);
		CreateLink('Output Enabled',   $ID_FileOutEnabled,               $ID_Output,   10);
		CreateLink('Logging Level',    $ID_FileOutLevel,                 $ID_Output,   20);
		CreateLink('Purge Files after',$ID_FileOutDays,                  $ID_Output,   30);
		CreateLink('Execute Purge',    $ID_ScriptIPSLoggerPurgeLogFiles, $ID_Output,   40);

		$ID_Output = CreateDummyInstance("Log4IPS", $ID_CategoryiPhone, 500);
		CreateLink('Output Enabled',   $ID_Log4IPSOutEnabled,            $ID_Output,   10);
		CreateLink('Logging Level',    $ID_Log4IPSOutLevel,              $ID_Output,   20);
		CreateLink('Purge Files after',$ID_Log4IPSOutDays,               $ID_Output,   30);
		CreateLink('Execute Purge',    $ID_ScriptIPSLoggerPurgeLogFiles, $ID_Output,   40);

		$ID_Output = CreateDummyInstance("EMail", $ID_CategoryiPhone, 600);
		CreateLink('Output Enabled',   $ID_EMailOutEnabled,              $ID_Output,   10);
		CreateLink('Logging Level',    $ID_EMailOutLevel,                $ID_Output,   20);
		CreateLink('Priority',         $ID_EMailOutPriority,             $ID_Output,   30);
		CreateLink('Send Delay',       $ID_EMailOutSendDelay,            $ID_Output,   40);
		CreateLink('Message List',     $ID_EMailOutMsgList,              $ID_Output,   50);

		$ID_Output = CreateDummyInstance("Prowl", $ID_CategoryiPhone, 700);
		CreateLink('Output Enabled',   $ID_ProwlOutEnabled,              $ID_Output,   10);
		CreateLink('Logging Level',    $ID_ProwlOutLevel,                $ID_Output,   20);
		CreateLink('Priority',         $ID_ProwlOutPriority,             $ID_Output,   30);
	}

	// ----------------------------------------------------------------------------------------------------------------------------
	// Some Tests
	// ----------------------------------------------------------------------------------------------------------------------------
	include_once 'IPSLogger.ips.php';
	//  Some Test Messages
	IPSLogger_Fat(__file__, 'Test for a Fatal Error');
	IPSLogger_Err(__file__, 'Test for a Error ...');
	IPSLogger_Wrn(__file__, 'Test for a Warning');
	IPSLogger_Not(__file__, 'Test for a Notification with Priority 0 (High)');
	IPSLogger_Not(__file__, 'Test for a Notification with Priority 10 (Low)');
 	IPSLogger_Inf(__file__, 'Test for a Information Message ...');
 	IPSLogger_Dbg(__file__, 'Test for a Debug Message ...');
 	IPSLogger_Com(__file__, 'Test for a Communication Message ...');
 	IPSLogger_Trc(__file__, 'Test for a Trace Message ...');
 	IPSLogger_Tst(__file__, 'Test for a Test Message ...');


   // ------------------------------------------------------------------------------------------------
	function CreateTimer ($Name, $Parent, $Hour) {
	   $TimerId = @IPS_GetEventIDByName($Name, $Parent);
	   if ($TimerId === false) {
 			$TimerId = IPS_CreateEvent(1 /*Cyclic Event*/);
   		IPS_SetName($TimerId, $Name);
   		IPS_SetParent($TimerId, $Parent);
			if (!IPS_SetEventCyclic($TimerId, 2 /**Daily*/, 1,0,0,0,0)) {
				echo "IPS_SetEventCyclic failed !!!
";
			}
			if (!IPS_SetEventCyclicTimeBounds($TimerId, mktime($Hour, 0, 0), 0)) {
				echo "IPS_SetEventCyclicTimeBounds failed !!!
";
			}
   		IPS_SetEventActive($TimerId, true);
			echo 'Created Timer '.$Name.'='.$TimerId."
";
		}
		return $TimerId;
	}

   // ------------------------------------------------------------------------------------------------
	function CreateProfiles() {
		@IPS_CreateVariableProfile("IPSLogger_Level", 1);
		IPS_SetVariableProfileText("IPSLogger_Level", "", "");
		IPS_SetVariableProfileValues("IPSLogger_Level", 0, 0, 0);
		IPS_SetVariableProfileDigits("IPSLogger_Level", 0);
		IPS_SetVariableProfileIcon("IPSLogger_Level", "");
		IPS_SetVariableProfileAssociation("IPSLogger_Level", 0, "Fatal",         "", 0xaaaaaa);
		IPS_SetVariableProfileAssociation("IPSLogger_Level", 1, "Error",         "", 0xaaaaaa);
		IPS_SetVariableProfileAssociation("IPSLogger_Level", 2, "Warning",       "", 0xaaaaaa);
		IPS_SetVariableProfileAssociation("IPSLogger_Level", 3, "Notification",  "", 0xaaaaaa);
		IPS_SetVariableProfileAssociation("IPSLogger_Level", 4, "Info",          "", 0xaaaaaa);
		IPS_SetVariableProfileAssociation("IPSLogger_Level", 5, "Debug",         "", 0xaaaaaa);
		IPS_SetVariableProfileAssociation("IPSLogger_Level", 6, "Communication", "", 0xaaaaaa);
		IPS_SetVariableProfileAssociation("IPSLogger_Level", 7, "Trace",         "", 0xaaaaaa);
		IPS_SetVariableProfileAssociation("IPSLogger_Level", 9, "All",           "", 0xaaaaaa);

		@IPS_CreateVariableProfile("IPSLogger_MsgCount", 1);
		IPS_SetVariableProfileText("IPSLogger_MsgCount", "", " Msg's");
		IPS_SetVariableProfileValues("IPSLogger_MsgCount", 5, 100, 5);
		IPS_SetVariableProfileDigits("IPSLogger_MsgCount", 0);
		IPS_SetVariableProfileIcon("IPSLogger_MsgCount", "");

		@IPS_CreateVariableProfile("IPSLogger_MsgId", 1);
		IPS_SetVariableProfileText("IPSLogger_MsgId", "", "");
		IPS_SetVariableProfileValues("IPSLogger_MsgId", 0, 0, 0);
		IPS_SetVariableProfileDigits("IPSLogger_MsgId", 0);
		IPS_SetVariableProfileIcon("IPSLogger_MsgId", "");

		@IPS_CreateVariableProfile("IPSLogger_Delay", 1);
		IPS_SetVariableProfileText("IPSLogger_Delay", "", " Seconds");
		IPS_SetVariableProfileValues("IPSLogger_Delay", 0, 600, 30);
		IPS_SetVariableProfileDigits("IPSLogger_Delay", 0);
		IPS_SetVariableProfileIcon("IPSLogger_Delay", "");

		@IPS_CreateVariableProfile("IPSLogger_Days", 1);
		IPS_SetVariableProfileText("IPSLogger_Days", "", " Tage");
		IPS_SetVariableProfileValues("IPSLogger_Days", 0, 100, 5);
		IPS_SetVariableProfileDigits("IPSLogger_Days", 0);
		IPS_SetVariableProfileIcon("IPSLogger_Days", "");

		@IPS_CreateVariableProfile("IPSLogger_Priority", 1);
		IPS_SetVariableProfileText("IPSLogger_Priority", "", "");
		IPS_SetVariableProfileValues("IPSLogger_Priority", 0, 10, 1);
		IPS_SetVariableProfileDigits("IPSLogger_Priority", 0);
		IPS_SetVariableProfileIcon("IPSLogger_Priority", "");
	}



?>

Mach mal einen Screenshot von dem Error, da sollte es noch mehr Info geben…

Überprüf auch noch, ob Du den Installer und Logger in der Version von 2.4 hast!
http://www.ip-symcon.de/forum/attachments/f53/12545d1310066963-ipslogger-kleiner-feiner-loghandler-fuer-ip-symcon-ipslogger_2011-07-07.zip
http://www.ip-symcon.de/forum/attachments/f53/12309d1308511043-ipsinstaller-einige-hilfreiche-scripts-autom-installation-ipsinstaller_2011-06-19.zip

Hallo,

der Fehler passiert beim Umschalten von DEBUG auf z.B. WARNING (siehe Anhang).

Gruß Proxima

@Proxima

Kontrollier mal Deine php.ini, da muß folgender Eintrag vorhanden sein:
auto_prepend_file=„C:&lt;<IP-Symcon Verzeichnis>>\scripts__autoinclude.inc.php“

…und im Scripts Verzeichnis muß die Datei __autoinclude.inc.php vorhanden sein.

Dieses Script sollte die IPS_XXX Variablen emulieren.

Okay, irgendwie war mir nicht klar, dass die neueste Version mit 2.4 nicht zusammenpasst.

Ich werd jetzt erst mal updaten auf 2.5.

Hallo,

  • php.ini ==> OK
  • Scripts Verzeichnis ebenfalls OK
  • in __autoinclude.inc.php wurde die Zeile aus dem Wiki eingefügt
  • auch eine Neuinstallation des Loggers bringt nichts

Woran könnte es sonst noch liegen ???

Gruß Proxima

ok, da ist die Wiki Beschreibung auch schon wieder etwas „veraltet“ - richtiger ist:
Anlegen einer Datei __autoload.php mit folgendem Inhalt:

<?
	include_once "IPSLogger_PhpErrorHandler.ips.php";
?>

Die Datei __autoinlcude.inc.php sollte man nicht verändern, da sie bei jedem Update wieder überschrieben wird.
Die Datei __autoinclude.inc.php sollte im Orginal so aussehen:


<?

if($_IPS['SENDER'] == "RunScript")
{
	$IPS_SENDER = $_IPS['SENDER'];
	$IPS_SELF = $_IPS['SELF'];
	$IPS_THREAD = $_IPS['THREAD'];
	foreach($_IPS as $key => $val)
	{
		if(!in_array($key, Array("SENDER", "SELF", "THREAD")))
		{
			${$key} = $val;
		}
	}
} else {
	foreach($_IPS as $key => $val)
	{
		${"IPS_".$key} = $val;
	}
}
 
switch($_IPS['SENDER'])
{
	case "HeatingControl":
		$HC_INSTANCES = $_IPS['INSTANCES'];
		$HC_INVERTS = $_IPS['INVERTS'];
		$HC_VALUE = $_IPS['VALUE'];
		break;
	case "ShutterControl":
		$SC_INSTANCE = $_IPS['INSTANCE'];
		$SC_INSTANCE2 = $_IPS['INSTANCE2'];
		$SC_DIRECTION = $_IPS['DIRECTION'];
		$SC_DURATION = $_IPS['DURATION'];
		break;
	case "ISDN":
		$ISDN_CONNECTION = $_IPS['CONNECTION'];
		$ISDN_EVENT = $_IPS['EVENT'];
		$ISDN_DATA = $_IPS['DATA'];
		break;
	case "WebFront":
		$REMOTE_ADDR = $_IPS['REMOTE_ADDR'];
		break;
	case "Designer":
		$REMOTE_ADDR = $_IPS['REMOTE_ADDR'];
		$REMOTE_HOST = $_IPS['REMOTE_HOST'];
		break;
}
 
if(file_exists("__autoload.php"))
	require_once("__autoload.php");


if (!function_exists('IPS_StatusVariableExists'))	
{
	function IPS_StatusVariableExists($InstanceID, $VariableIdent)
	{
		return !(@IPS_GetObjectIDByIdent($VariableIdent, $InstanceID) === false);
	}
}

if (!function_exists('IPS_GetStatusVariable'))	
{
	function IPS_GetStatusVariable($InstanceID, $VariableIdent)
	{
	   $id = IPS_GetObjectIDByIdent($VariableIdent, $InstanceID);
	   $v = IPS_GetVariable($id);
	   return Array(
			"VariableID" => $id,
			"VariableIdent" => $VariableIdent,
			"VariableName" => "N/A",
			"VariablePosition" => 0,
			"VariableProfile" => $v['VariableProfile'],
			"VariableType" => $v['VariableValue']['ValueType'],
			"VariableHasAction" => ($v['VariableAction'] > 0),
			"VariableUseAction" => ($v['VariableAction'] > 0)
		);
	}
}

if (!function_exists('IPS_GetStatusVariableIdents'))	
{
	function IPS_GetStatusVariableIdents($InstanceID)
	{
		$r = Array();
		$cids = IPS_GetChildrenIDs($InstanceID);
		foreach($cids as $cid)
		{
		   $o = IPS_GetObject($cid);
		   if($o['ObjectIdent'] != "")
			  $r[] = $o['ObjectIdent'];
		}
		return $r;
	}
}

if (!function_exists('IPS_GetStatusVariableID'))	
{
	function IPS_GetStatusVariableID($InstanceID, $VariableIdent)
	{
		return IPS_GetObjectIDByIdent($VariableIdent, $InstanceID);
	}		
}
?>

Hallo,

habe nochmals auf AKTUALISIEREN geklickt, woraufhin die __autoiclude … neu heruntergeladen wurde (sollte also korrekt sein).

Muss diese „__autoload …“ noch irgendwie in der PHP.ini eingebunden werden ???

Ansonsten ist der Fehler noch immer der gleiche.

Gruß Proxima

Nochmal Hallo,

habe mal alle " $IPS_ … " durch " $_IPS[’ … '] " ersetzt ==> jetzt bekomme ich keine Fehler mehr. Hab das auch schon in vielen anderen Scripts machen müssen.

Ich dachte das das irgendwie „automatisch“ geändert wird ??? Ist das nicht so, oder läuft bei mir was falsch ???

Gruß Proxima

@paresy

habe mal alle " $IPS_ … " durch " $_IPS[’ … '] " ersetzt ==> jetzt bekomme ich keine Fehler mehr. Hab das auch schon in vielen anderen Scripts machen müssen.

Ich dachte das das irgendwie „automatisch“ geändert wird ??? Ist das nicht so, oder läuft bei mir was falsch ???

Noch eine Idee?
Scheint so als ob die __autoinclude.inc.php nicht ausgeführt wird.

Hallo,

abgesehen von obigem Problem ist mir gerade noch was aufgefallen. Und zwar ist mein IP_symcon-Ordner über 1GB groß. Habe also mal nach dem „Schwergewicht“ gefahndet und den „Logs“ im IP-Symcon-Verzeichnis ausgemacht. In diesem Ordner finde ich einige „logfile … .log“ - TXT-Files und sehr viele „IPSLogger[Datum].xml“ XML-Files. Alleine die XML-Files beanspruchen 1GB. Vom Namen her würde ich auf den IPSLogger tippen :wink: . Können diese Files bedenkenlos gelöscht werden??? Löscht IPSLogger diese normalerweise selbst??? Könnte ein solches Löschen eingebaut werden??? Das erste XML-File stammt vom September 2011. D.h. in einem viertel Jahr 1GB --> in einem Jahr 4GB ???

Gruß Proxima