@fulfilld/app-logging
TypeScript icon, indicating that this package has built-in type declarations

0.0.93 • Public • Published

@fulfilld/app-logging

Usage

// execute once in your application entrypoint
initDebugGlobals({
    application: '[friendly app name]'
});

// retrive a logger identified by the options provided
const logger = getLogger({
  module: 'Auth',
  component: 'User Authentication',
  class: 'UserAuthController'
});

// write a log line
logger.debug('Received token from Oauth provider for user ${username}');

// log an error object
try {} catch (err) {
    logger.error(err);
}

Examples

# execute in a shell
ENVIRONMENT=local npx ts-node src/examples/app-test.ts

Environment Variables

#Enable console log output
DEBUG_LOGGING=true | false

/@fulfilld/app-logging/

    Package Sidebar

    Install

    npm i @fulfilld/app-logging

    Weekly Downloads

    0

    Version

    0.0.93

    License

    ISC

    Unpacked Size

    45.9 kB

    Total Files

    52

    Last publish

    Collaborators

    • shannonatfulfilld