Archive(FileName: String; [Callback: IAuditLogArchiveCallback = Null]; [Format: AuditLogArchiveFormat = 0]; [ClearLog: Boolean = False]);
FileName. File name.
Callback. Object that is used fro tracking the process of archiving of the access protocol.
Format. The file format which is used for saving.
ClearLog. Parameter that determines deletion of record from the access protocol after archiving.
The Archive method archives the access protocol in the file.
The ClearLog parameter is set to False by default, the access protocol is not cleared. If the parameter is set to True, all protocol records will be deleted after archiving.
Executing the example requires the AuditLog.pplog file.
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;
// Save access protocol to file
AL.Archive("C:\AuditLog.pplog");
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example the access protocol will be saved to the AuditLog.pplog file.
See also: