eShopSync

What is Debug Log in salesforce

Salesforce REST API

Salesforce REST API

Debug Log in salesforce

A debug log records data base operations, system process, and errors that occur when executing a transaction or while running unit tests. We can monitor specific users in log by adding them to list of Monitored Users.

 

Debug Log Details:

A salesforce debug log includes a header, execution units, code units, log lines, and other log data

 

  1. The time is in the user’s time zone in the format HH:mm:ss.SSS.
  2. Nanoseconds since the start of the request
  1. Method name
  2. The line number where the code was executed
  3. log data

The following information is monitored by  Logs:

  1. Workflow rules
  2. Assignment rules
  3. Approval processes
  4. Validation rules

 

Levels:

You can also specify one of the following logging levels, The levels are listed from lowest to highest

These levels run from lowest to highest and are cumulative. So if you pick the finest level, you get all messages that are logged as error, warn, info, and so on. There are also several debug log categories, and the amount of information logged depends on the log level

 

Limits:

Each debug log must be 20 MB or smaller. If it exceeds this amount, you won’t see everything you need. Additionally, each org can retain up to 1,000 MB of logs. The oldest logs are overwritten.

System debug logs are retained for 24 hours. Monitoring logs are retained for seven days

 

How to delete debug Log?:

When salesforce org too many  logs, we need to delete some or all of your system logs and monitoring logs to create new log

for deleting log Use the Developer Console’s Query Editor to find and delete the logs using Tooling API.

  1. Open Developer Console.
  2. At the bottom of the console, select the Query Editor tab.
  3. Select Use Tooling API.
  4. Enter this SOQL query:SELECT Id, StartTime, LogUserId, LogLength, Location FROM ApexLog
  5. Click Execute.
  6. Select the logs you want to delete.
  7. Click Delete Row.
  8. To confirm the log deletion, click Yes.

Hire a Salesforce Consultant

 

Exit mobile version