Nacho Portion Monitor


    1.0.28 • Public • Published


    This is a centralized logger that sends logs to papertrail (or any syslog system, you just need to set your host and port) and to the console when process.env.NODE_ENV is not production This logger is hardcoded for udp, if you want to use a more generic syslog, check out @firstfleet/ffsyslog. Its a modified version of winston-syslog. It adds colors and better formatting, breaking apart multiline messages like stack traces for better readability.

    This package requires winston and winston-papertrail. In order to send logs to paper trail, you must set define your options in process.env variables

        PAPERTRAIL_HOST: "host", --no default
        PAPERTRAIL_PORT: 8080, --no default
        PAPERTRAIL_PROGRAM: "program-name", --defaults to "default"
        PAPERTRAIL_HOSTNAME: "host machine", -- defaults to os.hostname()

    If the papertrail config is not setup the papertrail transport will not be created. At minimum you need a host and port.

    If you update the JS Docs you can rebuild the documentation by running

    npm run build-docs

    To publish to npm

    1. Increment the package version
    2. Login by running npm login
    3. Make sure you have been added to the firstfleet org
    4. run npm run send


    const logger = require('./ffLogger');
    logger.log('info', 'test info log'); //Log with level info'test info log'); //Log with level info
    logger.debug('debug level log'); //DEBUG level logs only go to console
    logger.error('error message', error); //Should really use ffErrorHandler handleError function but this will work




    npm i @firstfleet/fflogger

    DownloadsWeekly Downloads






    Unpacked Size

    12 kB

    Total Files


    Last publish


    • dwhitak
    • spies36
    • brbeaird
    • grantdaddy
    • jxpatto