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
chesschess 

system.debug prints messages such as 'ENTERING MANAGED PACKAGE'

I predominantly use system.debug to print out debug messages. I have noticed recently that if the LogLevel for apex code is set to debug, there are several messages printed in the log such as the following. These messages seems irrelevant and obscure the real messages.

08:47:01.221 (221465000)|ENTERING_MANAGED_PKG|
08:47:01.223 (223142000)|ENTERING_MANAGED_PKG|
08:47:01.223 (223247000)|ENTERING_MANAGED_PKG|
08:47:01.223 (223283000)|USER_DEBUG|[25]|ERROR|Entering Insert

 

I have resorted to using

System.debug(Logginglevel.ERROR, 'Message') and  setting the loglevel of ERROR to prevent these messages from showing. However, I was wondering if there was any other means to suppress these messages (without changing log level). Frankly these messages seem to be useless since they are not conveying anything at all.

Keith987Keith987

I share your frustration with these messages. I am hitting

 

*********** MAXIMUM DEBUG LOG SIZE REACHED ***********

 

because of these and so am unable to see my later LoggingLevel.ERROR messages at all.

Franck LewisFranck Lewis
In the logs of Developper console, put debug Level of 'ApexCode' to WARN (and above). It seems that the message 'ENTERING_MANAGED_PACKAGE' is INFO level. 
Put your own messages at WARN level with: 
System.debug(logginglevel.WARN, 'Your message' );

Hope this help !