Code Monkey home page Code Monkey logo

apex-log-gatherer's Introduction

Apex Log Gatherer

Gathering logs to export them from Salesforce, or even to view exceptions in one specific place, has historically been a painpoint of using SFDC. You can only view the Logs within setup, it's difficult to navigate there, and you can't perform any kind of programmatic logic based off an Apex object only available within the Tooling API.

This method is ready to be scheduled or used in other Apex to move your log data around / centralize the location of your exceptions.

Pre-requisites

  1. Deploy these classes to your Salesforce org
  2. Insert a blank record in AuditLog__c
  3. You'll need to have active trace flags in order for this service to update them
  4. You'll need to add your Salesforce base URL to the This.remoteSite file in src/remoteSiteSettings/This.remoteSite

Notes

You can't debug the results of ToolingApi.getLogs() from within the Salesforce Developer Console. I've included LogService so that you can use an external service, like cURL or Postman, to display the log results, in the event that you wanted to do further processing; otherwise, you won't need the LogService class.

Testing

Forthcoming.

apex-log-gatherer's People

Contributors

jamessimone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.