Skip to end of metadata
Go to start of metadata

Purpose

This function retrieves entries from the system log database and returns them as an array of LogEntry structures.  Use this function when you need to only filter log entries by date.


Parameters

Parameter: StartDate
Type: Date/Time
Description: This is the starting date for the log entries that you want retrieved.  If you do not care about a starting date, use Date.MinValue

Parameter: EndDate
Type: Date/Time
Description: This is the ending (latest) date for the log entries that you want retrieved.  If you do not care about an ending date, use Date.MaxValue


Returns

Return value: LogEntry
Type: Array of Structure LogEntry
Description: See LogEntry Structure.


Example

Sample Code
    Function GetLog_Date(ByVal StartDate As Date, ByVal EndDate As Date) As LogEntry()

This example retrieves all log entries from a week ago to today:

Sample Code
Dim Logs() As HomeSeerAPI.LogEntry
	Logs = hs.GetLog_Date(Now.AddDays(-7), Now)
	If Logs IsNot Nothing AndAlso Logs.Count > 0 Then
    hs.WriteLog("Info", Logs.Count.ToString & " log entries retrieved, and this just added another!")
End If


  • No labels