Salesforce.com – Debug Logs in Winter 16 release

Being a developer we all know what does it mean when someone says there is an issue in our code. At that very moment the first thing that comes into out mind is: do we have a log for this issue ?

There has been a quick change in the winter 16 release the way we see set and see the debug logs in our orgs. Here is a quick summery of what I could see:  (NOTE: I believe in practical knowledge more.. so never went through the release notes yet 🙂 . So request you to correct me when I am going wrong by commenting on this BLOG)

OLD Debug log screen: You have 20 log request at a time. After 20 logs you have to set it back.

Olddebuglog

New screen: You can request for 24 hours log now. No need to click on the reset button after 20 logs.

newdebuglog

Old Class level logs: On the class record you could set log levels.

Loglevelsold

New Class level logs: On the class record you could set log levels but in a bit different way.

newclasslevellogs newclasslevellogs1 newclasslevellogs2

What are log Levels ?

debuglevel

These are the types of logs typically seen in your logs. So when you do some action in the visualforce pages or on any records, DMLs etc. A log will get generated which will show you all these details. Database logs will show you all database related details such as which object the operation was interacting with. Workflow logs will show you all the workflow details which were fired due to you operation. Same with Visualforce and etc.

logoptions

 

Each type of log such as workflow,validations callouts etc has types of logs they can offer you. The options are as above image. When you set a particular log type to None , the log generated by any action will not have any details of that type. So, if you say workflow = None, you will not see any valuable info about workflow in the logs. When you say Error, only that particular logs will be shown when an Error occurred during some operation. Finest is the most detailed log that can be generated. Remember more detailed log more is the log file size and there is a chance you will miss the main details you wanted to see.  There is a limit for the log file size . I could not find a proper answer to the query yet. But as of now what I have heard and get to know from other sources, the max log size is 2 MB. So your system will skip the logs if your logs are more than 2 MB. So carefully selecting your log levels will save your time 🙂

Example : if you want to see logs about a particular class in an operation, you can turn off the logs for other classes, so that you can concentrate on the main class, which you think is buggy. If  you want to see only visualforce details, set visualforce page logs to be debug and others as NONE , that might help reduce your log size and give you more information without skipping anything in between.

 

Hope this helps..

 

Keep reading and sharing……   Comments and queries are always welcome… 🙂


Comments

Leave a Reply

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