This server-side class allows operations with log archives.
removeUnpacked(sysLogArchiveId)
This method allows removing unpacked outdated logs. By default, the logs older than one month are considered outdated. You can edit the archiving period with the simple.logs.rotate_period_in_days system property.
Note that the log archive is not deleted when calling this method. It deletes only temporary tables containing the logs that were created within previous unpacking.
Parameter(s):
Name
Type
Mandatory
Default Value
sysLogArchiveId
String
Y
N
Return:
Type
Description
Void
This method does not return a value.
Example:
removeUnpacked
const logArchive = new SimpleLogArchive();
logArchive.removeUnpacked('161478566913431857');
runPacking()
This method packs outdated logs into an archive. By default, the logs older than one month are considered outdated. You can edit the archiving period with the simple.logs.rotate_period_in_days system property.
Return:
Type
Description
Void
This method does not return a value.
Example:
runPacking
const logArchive = new SimpleLogArchive();
logArchive.runPacking();
runUnpacking(sysLogArchiveId)
This method runs log archive unpacking. After the unpacking is over, the logs are placed in the related log tables. See the System Audit articles to learn more.
Parameter(s):
Name
Type
Mandatory
Default Value
sysLogArchiveId
String
Y
N
Return:
Type
Description
Void
This method does not return a value.
Example:
runUnpacking
const logArchive = new SimpleLogArchive();
logArchive.runUnpacking('161478566913431857');