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

3 Answers 3

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.

1
  • 2
    Download log is back with winter13! Oct 18, 2012 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.

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .