Skip to content

Log Batch Purger and scheduler #724

Answered by jongpie
nishanth-yb asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @nishanth-yb there's some info about this in README, but essentially:

  • The date field Log__c.LogRetentionDate__c controls when a Log__c record is deleted (as well as its related LogEntry__c records).
    • LogBatchPurger will delete any records where LogRetentionDate__c <= System.today()
    • To keep a record, you can set LogRetentionDate__c to null
  • You can use the custom settings field LoggerSettings__c.NumberOfDaysToRetainLogs__c to customize (including per profile or user if you want) the value saved in Log__c.LogRetentionDate__c.
    • By default, LoggerSettings__c.NumberOfDaysToRetainLogs__c is populated with "TODAY + 14 DAYS" - so by default, all Log__c records will be kept for 14 days before L…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jongpie
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Layer: Log Management Items related to the custom objects & Logger Console app Feature: Log Retention Items related to LogBatchPurger or LogBatchPurgeScheduler
2 participants