Logger User Guide

Handling multiple records in bulk is an integral part of the development using Salesforce platform. Salesforce provides extensive logging capability for the developer to log the events on a transaction, but when processing multiple records in a transaction or when processing the record data across multiple transactions, it becomes very challenging to check a flow happened on a record.

With Record Logger App, we are providing a framework for the developers to log on the record. This framework can be used to provide visibility of the functional logic path the system enforces on the record to users. This app can be handy in Field debugging.

Introduction

Record Logger application provides a framework for developers to log in Apex code. It helps the admin and business users to check whether the system is working as expected with a click of a button. This document will go through the features of this application, and the steps admin must follow to bring the most out of the application.

Core Objects

Record Logger application revolves around following concepts.

  • Log Transaction
  • Log

Log Transaction

Log Transaction object represents a transaction in execution. For every transaction that involves log will have one Log Transaction record.

Log

Log object will hold the log for the record. Internally one Log record for the Salesforce record holds multiple Log messages.

Record Logger application supports both Salesforce Classic and Lightning Experience.

Classic Experience

Application Access

Once the Logger App is installed and configured by Admin, users can access the app in the app listing on the Salesforce display top right drop-down panel.

Users will see the tabs as below.

Using Log Viewer users can view the log associated with the record by entering the Salesforce record Id.

Log Viewer

The application provides a custom page for displaying logs.

Goto Logger app and click on ‘Log Viewer’ tab in the tab panel.

Enter the record id in the search box.

Click on ‘Show Logs’ button.

The log messages included by the developer in the functional flow for that record will get displayed in the Message column.

To find all the logs across the records in the transaction, click on log transaction record link in the TransactionId column.

choose a tag in the ‘Select Tag’ option, to filter logs based on tag.

Log Button

If configured by Admin, Users can view logs associated with the record from the detail page by clicking the button.

Lightning Experience

Application Access

Users can access logger app in Lightning experience from the salesforce app launcher.

Logger in app launcher

Log viewer tab

Using Log Viewer in the Navigation bar, users can view the log associated with the record by entering the Salesforce record Id.

Log Viewer

To view the logs for the record, enter the record Id in the text box, press Enter.

The log messages included by the developer in the functional flow for that record will get displayed in the Message column.

To find all the logs across the records in the transaction, click on log transaction record link in the TransactionId column.

Log Viewer Action

If configured by Admin, Users can view logs associated with the record from the detail page by clicking the Log Viewer Action.

Retain Log

Log Transaction records are available in the system for configurable retention hours, beyond which system automatically delete the logs to preserve storage. By default, retention hours is 48 hours.

The application provides the user the ability to retain logs in the system beyond the retention hours.

To Retain logs:

Navigate to log transaction record page by clicking on the log transaction link in Log Viewer.

Check the Retain Log check box in the Log Transaction Record page. By enabling Retain log for the transaction, the system won't automatically deletes the log transaction and logs associated with the transaction.

Leave a Comment

Your email address will not be published. Required fields are marked *

Loading