26 May 2015

Download Event Log Files Using the ELF Browser


Event Monitoring makes downloading application logs easy using the Salesforce API.

But what happens if you don't know how to use the API? Or you don't have an operating system that makes running a download script easy? Or you've never written a download script before? Or you just want a quickly download a newly generated file without messing around with code?

Introducing the Salesforce Event Log File Browser: https://salesforce-elf.herokuapp.com/.

This browser based app, built by Abhishek Sreenivasa and the platform monitoring team, uses Ruby on Rails and is hosted on Heroku.

It's designed to enable administrators or developers, who just want to focus on the log data, to easily download an Event Log File without writing any code or setting up any integrations. This makes it perfect for both trying out Event Monitoring as well as getting started downloading log files.

The app is designed to be very simple. After logging into your production or sandbox organization using OAuth, you are presented a list of downloadable files.

Because you may have up to thirty days of files, you can filter on both the date range and the file type to find specific files that you want to download.



You can choose to either download the file by selecting the green download action icon or you can get a jump start on a simple cURL script by selecting the light blue page action. The latter action was created to help bootstrap the integration effort. For instance, if an integration specialist asks how to create a script to automate the downloads on a daily basis, you could give them this script to help get them started.

The code for this app is available publicly on Github. You can log any issues you may encounter directly to this Github repo as well. The app is licensed under MIT licensing terms, so you're free to take the source code and modify it to meet your use case.

API first features like Event Monitoring make it easy to create apps that meet a wide set of use cases. The Salesforce Event Log File Browser app is just one example.

While this browser doesn't take the place of an automated download script, it does simplify both the trial experience as well as enable simple downloads of Event Log Files without writing any code or understanding how OAuth works. And because all organizations now have at least login and logout log file types, if not all twenty nine types, anyone should be able to use it. Happy downloading!

8 comments:

  1. Replies
    1. Hi Rick,

      I actually used your name when describing the problem set why needed to create this app! Hope you can get some use out of it!

      Thanks for your patience and your continued use of our apps.

      Adam

      Delete
  2. Adam-

    Playing with trying to download flies from a developer org. I get no results for yesterday (I was doing many things in my org yesterday). From what I can tell there is only 1 day retention so there should be some entries in there yesterday. I tried the workbench, ELF browser, and custom curl requests. All returned 0 rows. Do I need to have it specifically activated for a developer org?

    ReplyDelete
    Replies
    1. Hi Tim,

      That's strange. What's the orgid under setup > company information? Also, try checking different parts of the day. I want to make sure it's not a timing issue with how we delete files. Thanks!

      Delete
    2. Thanks for the response. My org ID is: 00D61000000Hgbz

      I was in there yesterday at around this time creating and deleting records via the REST api so there should be some login and API events if I am reading the documentation correctly.

      Not sure what you mean by time. I am just sending this query to the REST API:

      Select Id, EventType, LogDate from EventLogFile

      and I get

      {"totalSize":0,"done":true,"records":[]}

      When I use the workbench or the ELF tool I used the Count() and looked back many days. Every time I got 0 records.

      Delete
    3. Also I am doing it all as System Admin with the right perms.

      Delete
    4. I mean try querying eventlogfile tomorrow morning after 6 and before noon. Sounds silly, just want to see if there are any records or if I need to dig in a little more

      Delete
    5. Started getting data yesterday in the morning. If you fixed it thanks!

      Delete

Note: Only a member of this blog may post a comment.