This server-side class allows operations with log archives.

removeUnpacked(sysLogArchiveId)


This method allows removing unpacked outdated logs. By default, logs older than one month are considered outdated. You can edit this value by changing the simple.logs.rotate_period_in_months system property value.


Parameter(s):

NameTypeMandatoryDefault Value
sysLogArchiveIdStringYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

const logArchive = new SimpleLogArchive();
logArchive.removeUnpacked('161478566913431857');


runPacking()


This method packs outdated logs into an archive. By default, logs older than one month are considered outdated. You can edit this value by changing the simple.logs.rotate_period_in_months system property value.


Return:

TypeString
VoidThis method does not return a value.


Example:

const logArchive = new SimpleLogArchive();
logArchive.runPacking();

runUnpacking(sysLogArchiveId)


This method removes outdated logs from the log archive. By default, logs older than one month are considered outdated. You can edit this value by changing the simple.logs.rotate_period_in_months system property value.


Parameter(s):

NameTypeMandatoryDefault Value
sysLogArchiveIdStringYN


Return:

TypeString
VoidThis method does not return a value.


Example:

const logArchive = new SimpleLogArchive();
logArchive.runUnpacking('161478566913431857');