@qantas-assure/logger
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    Logger by Qantas Loyalty

    A lightweight logger for node servers or client side dev.

    Why use this package?

    It enables meaningful and granular logging for serverside JS

    e.g.

    [logic:fetchCmsData] cms cache miss: cmsData
    [logic:fetchCmsData] successfully saved cms cache cmsData
    [logic:fetchCmsData] cms cache hit: cmsData
    [server] cache reset
    [logic:fetchCmsData] successfully saved cms cache cmsData
    

    It also has sentry.io logging built in.

    Getting started

    npm install @qantas-assure/logger --save

    OR

    yarn add @qantas-assure/logger

    Usage

    import Logger from '@qantas-assure/logger';
     
    const options = {
        logLevel: 'info', // one of 'log', 'info', 'warn', 'error'
        appEnv: 'development', // process.env.NODE_ENV
        sentryEnabled: false, // if you're using sentry, enable logging with raven-js - https://docs.sentry.io/clients/javascript/
    };
    const log = new Logger('Component Name', options);

    Keywords

    none

    Install

    npm i @qantas-assure/logger

    DownloadsWeekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    5.63 MB

    Total Files

    16

    Last publish

    Collaborators

    • bluebill1049
    • lukeboyle
    • willmcpo
    • yusinto