You need to sign in to do that
Don't have an account?
Karthi_Velu
How To print the Log message in console using Apex or Trigger
Hi,
Can any one help me "How To print the Log message in console using Apex or Trigger"
System.debug('text') wast not working or printing in "
" link, even iadded the user in setup ===> monitoring ===> debug logs.. No Use..
Thnx KarthiVB
Tnx for ur response!
}
Can you tell me where 'test Karthig' it will not printing , i have checked in "System Log" link with combination of Log LogLog category: None Database Workflow Validation Callout Apex Code Apex Profiling Log level:debug, but no text..
2).Also in above trigger code i can't use that one for After trigger ChangeLeadCheckStatus on Lead (after insert, after update).
3).is it possible to update a single field in lead object record using id(if so how to set the id to object).
Have you been able to figure out why the system log isn't showing any System.Debug messages?
I'm having this issue also. I can see System.Debug messages during unit tests, but they don't show up in the System Log. Even when I have the setting to "Finest".
Jeff
Jeff, are you saying that the messages don't appear, even when you type System.debug('text') in the System Log window?
Could you supply a copy of the text that appears? (Either scroll up or Select All to grab all the text.)
Ok, I've been struggling with this all day. I have System.Debug peppered throughout my apex controller class, and none of it shows up in the System Log window.
Then I go in and type in System.Debug('Text'); and Execute Apex, and not surprizingly, it works. Then I run my controller and all the Missing debug messages show up. Maybe because I shut it down and restarted everything.
So I have a co-worker that has been having the same problem for a long time. I had him try the same thing, but when he tries to run it from the Execute Apex window, he gets this message:
16:53:30 DEBUG - Executing: system.debug('test'); 16:53:31 ERROR - INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Try logging in again.And he opened the System Log the same way I did (next to the setup link).
I don't know why mine is now working, but his isn't. It is very difficult to develop and not to be able to see debug messages.
Thanks for your reply,
Jeff
When I write code and run Tests, I view the log file that is generated during the test, which appears within Eclipse. So, I don't really use the System Log window except for running occasional Apex commands.
There is also log functionality under Setup/Monitoring/Debug Logs that you can turn on to capture log information.
P.S. If you're inserting code, use the "Insert Code" button to get pretty formatting.