A Salesforce connected web app to access and download Event Log Files. Access it on Heroku.
Salesforce event log file is a file-based API to get your Salesforce organization's application log data. These files provide visibility into your org for security auditing, application performance, and feature adoption.
Event log file browser is a Salesforce connected app built with Ruby on Rails to help you access and download event log files. The downloads are streamed to the web client via the Rails application using Rail's ActionController::Streaming
.
Follow these steps if you wish to host your own instance of the application on any Rails hosting platform.
This step can be performed from any Salesforce organization.
- Navigate to Setup > Create > Apps > Connected Apps > New
- In the New Connected App page, check Enable OAuth Settings.
- Enter the callback URL. For localhost, use
http://localhost:3000/auth/salesforce/callback
. If it's hosted, usehttps://<your domain>/auth/salesforce/callback
. If you do not use SSL, you must setconfig.forcessl = false
in config/environments/production.rb - Add Access and manage your data (api) to the Selected OAuth Scopes.
- Fill out the remaining required fields and click Save.
- Once you save, you'll be taken to a page that has the consumer key and consumer secret.
- Repeat steps 1-6 for sandbox instance with a slight change in step 3 -- replace
.../auth/salesforce/callback
with.../auth/salesforcesandbox/callback
- Note your consumer key and secret and for both production and sandbox instances.
Configure the following environment variables.
SALESFORCE_ELF_CONSUMER_KEY
: (required) Salesforce consumer key for production from previous section.SALESFORCE_ELF_CONSUMER_SECRET
: (required) Salesforce consumer secret for production from previous section.SALESFORCE_ELF_SANDBOX_CONSUMER_KEY
: (required) Salesforce consumer key for sandbox from previous section.SALESFORCE_ELF_SANDBOX_CONSUMER_SECRET
: (required) Salesforce consumer secret for sandbox from previous section.SECRET_KEY_BASE
: (required) Secret key for encryption that you can generate usingrake secret
. Rotate the keys periodically.ELF_MAX_DOWNLOAD_FILE_SIZE_IN_BYTES
: (optional) The maximum size of file allowed via streaming download. Default is 5_000_000 (~5MB).ELF_GOOGLE_ANALYTICS_TRACKING_ID
: (optional) For Google Analytics tracking.
If using Rails, once the environment variables are setup, you can start the application using rails server
or foreman start
.
If using Docker, the environment variables can be added to a .env
file or passed through to the container and started with docker-compose up
Report bugs and issues here.
(Listed in no particular order)
- Abhishek Sreenivasa - developer and maintainer
- Adam Torman - QA and product management
- Soumen Bandyopadhyay - QA
- Ivan Weiss - QA
- Justine Heritage - documentation
- Aakash Pradeep - QA