Find your content:

Search form

You are here

How to compare logs in the console?

 
Share

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


Attribution to: ceiroa

Possible Suggestion/Solution #1

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.


Attribution to: ArtieBrosius

Possible Suggestion/Solution #2

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.


Attribution to: Peter Wisnovsky

Possible Suggestion/Solution #3

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.


Attribution to: Benj
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1472

My Block Status

My Block Content