1. Install the package in Dev or Sandbox org from app exchange
2. Use the logger in code
- Set Log Description, once for every execution scenation
- Laas.Log.SetDescription(string description);
- Use following functions, as needed, inside Apex code :
- Laas.Log.Debug(string component, string message);
- Laas.Log.Info(string component, string message);
- Laas.Log.Error(string component, string message);
- Laas.Log.Warn(string component, string message);
- Laas.Log.Exception(string component, Exception ex);
- Save log before returning from all webservice calls, batch & controller functions :
- Laas.Log.Save(true);
3. Configure logger in org
- Go to Setup->Custom Settings
- Enable logging by creating an entry at org-level, profile-level or user level
4. Run business scenario and analyse logs
- Run your business scenarios.
- For testing purpose, we can use Developer console
- Go to “Log Management” app
- Click “View Log” on any Log
All the logs are available to view. We can filter based on user, date, log-type and log-description