Logger
Fingermark Logger abstraction
Overview
Fingermark Logger includes 2 different logger instances that follow the same format. ApexLogger which integrates with Apex Logs and FallbackLogger which is an abstraction of our syntax to the normal console logging functions.
One of the primary use cases for the logger is to setup default fields for all logs (client tags, domain tags etc)
Usage
import { ApexLogger } from '@fingermarkglobal/logger';
window.logger = new ApexLogger({
fields: {
client: 'Restaurant Default',
},
token: process.env.POI_APP_LOGGER_TOKEN,
project: process.env.POI_APP_LOGGER_PROJECT,
endpoint: process.env.POI_APP_LOGGER_ENDPOINT,
level: process.env.POI_APP_LOG_LEVEL,
});