New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@firstfleet/fflogger

Package Overview
Dependencies
Maintainers
5
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@firstfleet/fflogger

Log to Loggly, and console in dev

unpublished
latest
npmnpm
Version
1.1.1
Version published
Weekly downloads
0
Maintainers
5
Weekly downloads
 
Created
Source

@firstfleet/fflogger

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

  • Increment the package version
  • Login by running npm login
  • Make sure you have been added to the firstfleet org
  • run npm run send

Example

const logger = require('./ffLogger');

logger.log('info', 'test info log'); //Log with level info
logger.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

FAQs

Package last updated on 07 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts