Skip to main content

%ZEN.Mojo.ActivityLog.Utils

Provides API methods for the application activity log.

Method Inventory

Methods

classmethod %AddSummarizerClass(pAppName As %String = "", pClassName As %String = "", pIsDefault As %Boolean = 0) as %Status
Associate a custom summarizer class with an activity log application.
classmethod %AddTime(pDate As %Date, pSeconds As %Integer) as %Date
Add a number of seconds to a $H value.
classmethod %BuildTestData(pFileName As %String) as %Status
Diagnostic. Build fake log data and write it to a file.
classmethod %GetActivityCounts(pAppName As %String, pSummary As %String = "", Output pResults) as %Status
Compute activity count information from the summary log.
Returns an array of results:
pResults("yyyy-mm-dd hh", activity) = count
classmethod %GetActivityCountsById(pAppName As %String, pSummary As %String = "", pActivity As %String, Output pResults) as %Status
Compute activity count information for a specific activity (or list of activities).
from the summary log organized by UserId
Returns an array of results:
classmethod %GetActivityListById(pAppName As %String, ByRef pActivities As %String, Output pResults, pFieldNumber As %Integer = 5, pStartDay As %Date = "", pEndDay As %Date = "", pMaxResults As %Integer = 1000) as %Status
Return a detail list of all events for a specific activity (or list of activities).
By default, this groups on UserID (in field 5), but this may be modified to match on other criteria.
Returns an array of results:
classmethod %GetActivityLogForUser(pAppName As %String, Output pResults As %Integer, pFieldNumber As %Integer = 5, pFieldValue As %String = "", ByRef pActivities, pMaxResults As %Integer = 100) as %Status
Return the details of given activities for the supplied pFieldNumber. By default, this matches on UserID (in field 5), but this may be modified to match on other criteria.
The result is in reverse chronological order is restricted to 100 items. Returns an array of results:
classmethod %GetDefaultSummarizerClass(pAppName As %String) as %String
Get the default summarizer class for the given application.
classmethod %GetDefaultSummary(pAppName As %String) as %String
classmethod %GetSearchTerms(pAppName As %String, Output pResults, pTopCount As %Integer = 3) as %Status
Find the list of the top N search terms for each time period from the summary log.
Returns an array of results:
pResults("yyyy-mm-dd hh", term) = count
classmethod %GetSummarizerClass(pAppName As %String, pSummaryName As %String = "") as %String
Get the summarizer class for the given application with the specified Summary Name.
classmethod %GetSummarizerClasses(pAppName As %String = "", Output pSummarizers As %String) as %Status
Get all summarizer classes for the given application.
classmethod %GetSummaryConfig(pAppName As %String, pSummary As %String = "", Output pSummaryName As %String, Output pSummarizer As %String) as %Status
classmethod %GetTimeRange(pAppName As %String, pSummaryName As %String = "", Output pStartTime, Output pEndTime) as %Status
Find the start and end times of a summary log.
classmethod %ImportLogFile(pAppName As %String, pFileName As %String, pVerbose As %Boolean = 1) as %Status
Import log data from a csv file. Used for testing.
Each line in the file should contain:
yyyy-mm-dd hh:mm:ss,pAction,pSessionNo,pUserName,pUserID [,optional values]
classmethod %KillLog(pAppName As %String) as %Status
Clear the activity and summary logs for the given application name.
classmethod %Log(pAppName As %String, pAction As %String, pSessionNo As %String = "", pUserName As %String = "", pUserID As %String = "", pActionData As %String = "", pValues...)
Add an item to the activity log.
pAppName is the application name.
pAction is the type of activity. Built-in actions are "$start" and "$end" which mark the start and end of a session.
pSessionNo is a session identifier.
pUserName is the user login name.
pUserID is a user id # (if known).
pActionData is data that is specifically tied to built-in actions.
pValues is an application specific set of additional values.
classmethod %NotifyMetaSummarizers(pAppName As %String, pSummary As %String, pPeriod As %Integer) as %Status
classmethod %PrintSummary(pAppName As %String, pSummary As %String = "")
Print out summary information from activity log.
classmethod %RemoveSummarizerClass(pAppName As %String = "", pClassName As %String = "") as %Status
classmethod %RemoveSummary(pAppName As %String = "", pSummaryName As %String = "") as %Status
classmethod %SetDefaultSummarizerClass(pAppName As %String, pClassName As %String) as %Status
classmethod %Summarize(pAppName As %String, pSummary As %String = "", pAll As %Boolean = 1, pForce As %Boolean = 0) as %Status
Compute summary information from activity log.
If pAll is true, then summarize all periods that are not up-to-date, otherwise just the current period.
If pForce is true, the summarize whether up-to-date or not.
The actual work is done by a Summarizer class.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab