IAuditLog.CountLogons

Syntax

CountLogons([NoFilterLogons: Boolean = False]): Integer;

Parameters

NoFilterLogons. Filtering conditions are not taken into account.

Description

The CountLogons method returns the number of records about the connections to the repository (login) in the access protocol.

Comment

The NoFilterLogons parameter is optional. Available values:

Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    AL: IAuditLog;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    
// Open access protocol
    Al := MS.OpenAuditLog;
    Debug.WriteLine(
"Record number about connection with repository: " + AL.CountLogons.ToString);
    Debug.WriteLine(
"Record number about operations in repository: " + AL.CountOperations.ToString);
    
// Check in license
    Lic := Null;
End Sub UserProc;

After executing the example the console will display the number of records in access protocol about connection with repository (login) and the number of records about operations in repository.

See also:

IAuditLog