« Back to Product

Documentation

UC_ResetLogMessageStatistics

 bool UC_ResetLogMessageStatistics (int $InstanceID) 

Parameters

InstanceID

ID for the Util Control

Returns

If the command succeeds, it returns TRUE, otherwise FALSE.

Description

The function sets all counters of UC_GetLogMessageStatistics to 0 and ResetTimeStamp to the current time. Afterwards only what is written to the log from this point on is counted.

MessageTimeStamp remains unchanged. The stored messages of UC_GetLastLogMessages are kept as well, they are cleared with UC_ResetLastLogMessages.

The ID of the Util Control instance can be determined e.g. with IPS_GetInstanceListByModuleID and the module GUID {B69010EA-96D5-46DF-B885-24821B8C8DBD}. If InstanceID does not exist, the function fails with "Instance #... does not exist", if the instance belongs to another module, with "Instance does not implement this function".

Example

// Determine the ID of the Util Control instance
$id = IPS_GetInstanceListByModuleID('{B69010EA-96D5-46DF-B885-24821B8C8DBD}')[0];

UC_ResetLogMessageStatistics($id);

// Count anew from now on
echo 'Counting since ' . date('d.m.Y H:i:s', UC_GetLogMessageStatistics($id)['ResetTimeStamp']);
Any questions?