You need to sign in to do that
Don't have an account?
To set the log levels (when Max debug log size is reached)
Hi,
I am running unit tests and I need to see values at few places.
So I have used debug statements similar to below one at lot of places:
system.debug(Logginglevel.ERROR,'message no # 1');
Still I am not able to see the messages in debug log b/c of max debug log size issue.
I also went to developer console - > workspace: Default -> Change log levels -> I have changed every one to ERROR level.
Once I ran the test class and see log file on the first line of the file I see below details
"24.0 APEX_CODE,FINE;APEX_PROFILING,FINE;DB,INFO;VALIDATION,INFO;WORKFLOW,FINEST"
I am not sure why the levels are not changed in the above debug log.Please help me on this.
Thanks,
JBabu.
Have you tried to use the "Developer Console"?
You can open it going to:
user menu -> developer console
Hope that helps
Joao
PS: Please mark as solution if it fixed your problem
Hi,
I have changed the log settings in developer console (Workspace Default-> Change log settings, made every one to ERROR).
But I cannot execute the test class in developer console as it has static variables.
I have placed statements like :
system.debug(Logginglevel.ERROR,'message no # 1');
in my apex test class. But filtering of the log file is not happening.
Please let me know where am I doing wrong.
Thanks,
JBabu.
Have you tried to use the debug logs:
setup -> monitoring ->debug logs (then choose your user)
Yes, I am seeing debug log files from set up-> monitoring-> debug logs.
But first line of debug log file show below details even after changing the log level settings in developer console.
"24.0 APEX_CODE,FINE;APEX_PROFILING,FINE;DB,INFO;VALIDATION,INFO;WORKFLOW,FINEST"
I know its frustrating.
Vote on my idea below
https://sites.secure.force.com/success/ideaView?id=08730000000iKMpAAM
The way I labour through it is to do unit record test cases to see the logs and then once I am confident of each test case, put them all in bulk
We just hit the wall on this issue. We resolved it with a combination of:
We got from a log file of 1.9MB to 1Kb!!!
kinda funny you cant set log levels in test mode, since thats exactly when you need the control the most. Since the existing test class was so large, i ended up removing testmethod from all the tests and then created a single testmethod class that calls them all. that way, if my log levels get too large, i can isolate which test is throwing the error and then address it.