4

Is there a way to compare two logs in the console?

I'm following the tutorial in the Apex Workbook and at after executing two anonymous pieces of code it says to compare the two execution logs. I don't see anything in the UI that would allow me to do that. (But of course I'm new to the console, so I might be missing something). Thanks!

enter image description here

2

Unfortunately, it's pretty rough to compare logs. AFAIK, there's no way to compare within the Developer Console; I think they mean "Look at each of them and remember similarities and differences."

There used to be a "Download" button, but it was removed in the Summer '12 release for some reason.

The best solution I can recommend is to set up Debug Log Monitoring for your own user (Setup > Administration Setup > Monitoring > Debug Logs), which will save all of your debug logs. From this page, there is a Download button; save the logs and compare them in a diff viewer of your choice.

| improve this answer | |
  • 2
    Download log is back with winter13! – ca_peterson Oct 18 '12 at 22:29
3

I often find myself using the "Open Raw Log" button, then scraping the log, saving it to a text file with a .log extension. Then I can open it in OSX's "Console" app, which provides better (and more performant) tools for analyzing logs.

I also rolled a simple FileMaker database that can read in the log (each line is a record) and provide a quick way to search through the log.

| improve this answer | |
0

The download button was changed to Open Raw Log so you could get directly at the log without having to go through the Log Viewer UI.

Comparing logs is tricky because they include timestamps, but this could be filtered out. The Salesforce Idea Exchange is a good place to make a case for adding this feature; ultimately as we open up the tooling API it will be easier to add these kinds of tools for partners and developers in the community.

| improve this answer | |

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.