function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VishwanathVishwanath 

Please give some solution on this issue

Hi All,

Please help me from this problem

 

i have one custome object and i wrote two wolrk flow rule (for some calculation) and one trigger (also some calculation, before insert and before update)

and 3 validation rules, and one formula filed it will call the value form other object depending on the condition

 

all of above is working fine, but it will take long time to save the record and when i open the system log

last line is showing

 05:30:*********** MAXIMUM DEBUG LOG SIZE REACHED *********** 

 

is it mean is any problem with in my trigger or work flow......?

 

 

 

 

 

bob_buzzardbob_buzzard

Its not a problem with your code - the debug log is limited (to 2 million characters, as far as I recall) and once that limit is hit, no more log information gets recorded.

 

It smacks that you are doing a lot of work in your triggers/workflow, which may not be working as you intended, but the fact that it completes implies its not stuck in a loop or anything.

Chris JohnChris John

In the new System log you should be able to adjust the logging level for the various features.

 

You could try reducing the level of the Workflow or Apex logging, for example, to confirm where the majority of the logging comes from. That should give you an idea on where to start optimizing the logging.

crop1645crop1645

I'm a huge fan of using System.debug(LoggingLevel.INFO,'my debug statement here'); on large complex systems because the default APEX log level is DEBUG which generates a lot of noise.  Then, when I run my debugging sessions, I only get what I need. 

 

Even more clever is to make the first arg to System.debug() set by a runtime parm such as a custom setting so i can selectively turn on/off some debug statements depending on where the problem area is based on other evidence.  This can drastically reduce the debug log size at some cost in performance.