Logger
Publish Logs with CORE
const logger = new Logger({
shouldDisableRemoteLogging: false, // Can be set to true on local development env
});
// By calling this method, you will automatically send a log in the console and publish it to the Abyss Monitor Dashboard
logger.log('This is my first log');
logger.error('This is my first error log');
logger.warn('This is my first warn log');
logger.info('This is my first info log');
// Debug is similar to log but it's automatically save the stack trace
logger.debug('This is my first debug log');
// Advanced log
logger.error(error, {
context: "Mon Context",
scenario: "My Scenario",
// getRequestContext is an easy to use tool to get the current RequestId of your API
// Please check the Express Middleware setup before using it
requestId: getRequestContext().requestId,
});Last updated