Due to Salesforce logsize limit (250 MB) I have to reduce the log file issued from one of our process in the org. After a lot of code-optimization and removing all useless statements the logfile is still big enough to reach the limit.

I noticed that most of the payload in the logfile seems to be provided from "variable assignment" event so my question is, can I avoid this writing during the code running (process launched from dev. console from Anonymous window). I also want to avoid debug level modification if possible

To be clear, I don't want to prevent the event itself but the event writing in the log.


unfortunately without changing debug level VARIABLE_ASSIGNMENT event will be displayed at FINEST Apex code debug level. (according to Debug Log Levels)

so, set debug level to FINER or less


field or information logged with event: Line number, variable name (including the variable’s namespace, if applicable), a string representation of the variable’s value, and the variable’s address

category: Apex Code

level logged: FINEST

| improve this answer | |
  • Thanks for the reply, I guessed that there was some limitation but I tryed to know if any exotic solution exists – J.Dillinger Sep 19 '18 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.