Debug Log and Exception Handling
I am not sure if you belong to Salesforce practice team, testing team or development team. But I have a couple of questions to you. If you can't answer YES to all questions, please comment the reason for that, I request.
- Can you see log statements of every kind of information, input/output data, errors or any kind of payload as debug statement, in a unique and easily identifiable format, in the debug logs available in your Salesforce org without setting trace flag?
- Do you have any mechanism to log all application exceptions persistently in Salesforce? (I know 99% will answer YES to this question)
- If yes, Can you make sure that same application exception will not be repeatedly recorded as a duplicate in Salesfroce org if it recurs?
- Do you have a mechanism to notify the responsible person or easily track the about a negative outcome of a feature (other than exception)?
- Do you have an email messaging mechanism to notify the responsible person about application exceptions happened in your Salesforce org? If yes, have you taken enough precaution to make sure that this email notification will not hit organisational email notification limit?
- If answer is yes to the above question, have you taken any precaution to make sure that the recipient’s inbox will not be flooded with email notifications (especially if the exception is from a batch handling millions of records)? Or Are you sure that the recipient will get only one email notification irrespective of the number of recurrences of the exceptions by one or more users?
- Does the relevant person will get notified when an already fixed exception will recur in your Saledforce org?
- Do you make use of Salesforce cases to handle and resolve application exceptions in your Salesforce org?
- Will your development team ask for the details of an issue when you raise a ticket after an exception in production org?
- Do you have any way to record the performance of an apex method (number of milliseconds for execution) executed from each source (VisualForce, Trigger, Batch etc.) for the latest version of apex class in your Salesforce org?