IMetabaseSecurity.LoadAuditLog

Syntax

LoadAuditLog(FileName: String): IAuditLog;

Parameters

FileName. A path and a name of the file that contains an archived access protocol.

Description

The LoadAuditLog method loads archived access protocol from file sent by the FileName parameter.

Comments

The method works with archived access protocols saved in the *.pplog format.

To archive file access protocol, use the IAuditLog.Archive method.

Example

Executing the example requires that the root of the C disc contains the Log.pplog file containing the archived access protocol for the certain period.

Add a link to the Metabase system assembly.

Sub Main;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Log: IAuditLog;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Check out license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    
// Load access protocol from file
    Log := MS.LoadAuditLog("C:\Log.pplog");
    
// Display the number or records in protocol to the console
    Debug.WriteLine(Log.CountOperations);
    
// Save changes
    MS.Apply;
    
// Check in license
    Lic := Null;
End Sub Main;

After executing the example the archived access protocol is loaded from the file. The number of records contained in the protocol is displayed in the development environment console.

See also:

IMetabaseSecurity