All Projects → davidsbond → forcelog

davidsbond / forcelog

Licence: MIT license
A structured, extensible logger for Salesforce Apex

Programming Languages

Apex
172 projects

Projects that are alternatives of or similar to forcelog

DXB
A utility cli plugin built on top of #SFDX to facilitate devops.
Stars: ✭ 20 (-45.95%)
Mutual labels:  salesforce, sfdx
metadata-xml-tool
CLI tool for processing Salesforce Metadata XML files
Stars: ✭ 14 (-62.16%)
Mutual labels:  salesforce, sfdx
HTTPCalloutFramework
HTTP Callout Framework - A light weight callout framework for apex HTTP callouts in Salesforce
Stars: ✭ 43 (+16.22%)
Mutual labels:  salesforce, salesforce-apex
texei-sfdx-plugin
Texeï's plugin for sfdx
Stars: ✭ 99 (+167.57%)
Mutual labels:  salesforce, sfdx
apex-mocks-stress-test
Testing out FFLib versus Crud / CrudMock
Stars: ✭ 47 (+27.03%)
Mutual labels:  salesforce, salesforce-apex
apexmock
force.com Mock data and fixtures for Apex Unit Tests
Stars: ✭ 24 (-35.14%)
Mutual labels:  salesforce, salesforce-apex
sfdx-js
A TypeScript compatible JavaScript wrapper for Salesforce DX CLI.
Stars: ✭ 30 (-18.92%)
Mutual labels:  salesforce, sfdx
NebulaFramework
A development framework for Salesforce's Apex language & the Force.com platform
Stars: ✭ 28 (-24.32%)
Mutual labels:  salesforce, salesforce-apex
DXMate
Sublime Text 3 plugin to provide integration with the Salesforce DX CLI
Stars: ✭ 14 (-62.16%)
Mutual labels:  salesforce, sfdx
apex-dml-mocking
DML mocking, CRUD mocking, dependency injection framework for Salesforce.com (SFDC) using Apex
Stars: ✭ 38 (+2.7%)
Mutual labels:  salesforce, salesforce-apex
SF-Lightning-Lookup
Salesforce lightning dynamic lookup component.
Stars: ✭ 15 (-59.46%)
Mutual labels:  salesforce
NetCoreForce
Salesforce REST API toolkit for .NET Standard and .NET Core
Stars: ✭ 77 (+108.11%)
Mutual labels:  salesforce
jcabi-log
Static Wrapper of SLF4J easing you from the necessity to create static LOGGER instances in each Java class
Stars: ✭ 53 (+43.24%)
Mutual labels:  logger
management tools
A collection of scripts and packages to simplify OS X management.
Stars: ✭ 93 (+151.35%)
Mutual labels:  logger
guzzle-logger
Automatically log all API calls
Stars: ✭ 42 (+13.51%)
Mutual labels:  logger
ErrorHeroModule
💎 A Hero for your Zend Framework/Laminas, and Expressive/Mezzio application to log ( DB and Mail ) and handle php errors & exceptions during Mvc process/between request and response
Stars: ✭ 47 (+27.03%)
Mutual labels:  logger
sfdx-flowdoc-plugin
A Salesforce CLI plugin that generates design document from Lightning Flow (currently Process Builder) metadata
Stars: ✭ 56 (+51.35%)
Mutual labels:  salesforce
node-perj
A fast, flexible JSON logger.
Stars: ✭ 16 (-56.76%)
Mutual labels:  logger
flor
FLOR: Fast Low-Overhead Recovery. FLOR lets you log ML training data post-hoc, with hindsight.
Stars: ✭ 123 (+232.43%)
Mutual labels:  logger
SFDX-Data-Move-Utility-Desktop-App
This repository contains the special Desktop GUI Application, that will help you to prepare and execute data migration packages using the SFDMU Plugin.
Stars: ✭ 65 (+75.68%)
Mutual labels:  sfdx

ForceLog

ForceLog is a structured logger for Salesforce Apex that is extensible to suit various log formats and providers. It provides two loggers, ForceLog.Logger (for handling logs on an individual level) and ForceLog.BulkLogger (for handling logs in bulk).

License: MIT CircleCI

ForceLog.Logger Example

private ForceLog.Logger log = new ForceLog.Logger('myClassName');

public String getContactNameById(String id) {
    log.withField('id', id).info('querying contact');

    try {
        Contact c = [
            SELECT Name
            FROM Contact
            WHERE ID =: id
        ];

        log.withField('contactName', c.Name).info('queried contact');

        return c.Name;
    } catch(QueryException ex) {
        log.withException(ex).error('failed to query contact');
        return null;
    }
}

ForceLog.BulkLogger Example

private ForceLog.Logger log = new ForceLog.BulkLogger('myClassName');

public String getContactNameById(String id) {
    log.withField('id', id).info('querying contact');

    String name;
    try {
        Contact c = [
            SELECT Name
            FROM Contact
            WHERE ID =: id
        ];

        log.withField('contactName', c.Name).info('queried contact');

        name = c.Name;
    } catch(QueryException ex) {
        log.withException(ex).error('failed to query contact');
    }

    log.dispose();
    return name;
}

Please see the wiki for full implementation details and documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].