+ Start a Discussion

debug logs

Hi Guys,


I need some help regarding debug logs in production.


My production users are getting an error while running a vf page. I want to debug this case in production since I am unable to reproduce the same error into dev org. There in dev org, everything works fine. So my question is that "are the debug logs created for every production user automatically by the salesforce?


I found it that we can only create 20 debug logs for a user after that we need to reset. How does it work?

When I reset it for the first time after that count 20 does not get decremented. It remains fixed.







Yes, the debug logs created for every production user automatically by the salesforce


The following are the limits for debug logs:

Once a user is added, that user can record up to 20 debug logs. After a user reaches this limit, debug logs stop being recorded for that user. Click Reset on the Monitoring Debug logs page to reset the number of logs for that user back to 20. Any existing logs are not overwritten.


Each debug log can only be 2 MB. Debug logs that are larger than 2 MB in size are truncated.

Each organization can retain up to 50 MB of debug logs. Once your organization has reached 50 MB of debug logs, the oldest debug logs start being overwritten.


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 


Thanks Navatar for your reply.


I've one more question.


Consider a case that a user is getting an error and his max log limit (20) has already been reached. So next time when this user will do some activity then system, will create debug log for this user? or we will have to reset debug logs then only it will start again creating debug logs.


Does this mean that if error comes in production then we need to reproduce this error in production just after resetting logs for that user?


Or we can debug the error by its log which was created when error was occured for first time and we don't need to reproduce it.


What you say?