Lightweight package used for logging in Salesforce. Uses platform events and flows to save log events as SystemLog__c records.
Logger.getCurrent().publish('Test Error Message', LogLevel.ERROR);
Logger.getCurrent().add('Test Log Message 1', LogLevel.ERROR);
Logger.getCurrent().add('Test Log Message 2', LogLevel.ERROR);
Logger.getCurrent().add('Test Log Message 3', LogLevel.ERROR);
Logger.getCurrent().publish();
- Install npm
- Install Salesforce DX CLI
- Alternative:
npm install sfdx-cli --global
- Alternative:
- Clone this repository (GitHub Desktop is recommended for non-developers)
- Run
npm installfrom the project root folder - Install VS Code (recommended)
- Install Salesforce Extension Pack
- Install recommended plugins! A notification should appear when opening VS Code. It will prompt you to install recommended plugins.
- Install AdoptOpenJDK (only version 8 or 11)
- Open VS Code settings and search for
salesforcedx-vscode-apex - Under
Java Home, add the following:- macOS:
/Library/Java/JavaVirtualMachines/adoptopenjdk-[VERSION_NUMBER].jdk/Contents/Home - Windows:
C:\\Program Files\\AdoptOpenJDK\\jdk-[VERSION_NUMBER]-hotspot
- macOS:
To build the project locally using scratch orgs, follow these steps:
- If you have not authenticated to a DevHub run
sfdx auth:web:login -d -a productionand then log in. - Create scratch org and push project source.
npm install
npm run mac:build
- Authenticate to the environment that you would like to install the source to (it is recommended to always test in a sanbox first).
- run the following command:
sfdx force:source:deploy -p force-app/main/default -l RunLocalTests