Socket
Socket
Sign inDemoInstall

prelogger

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prelogger

Prefix your log messages to allow for correlation Ids and other metadata


Version published
Maintainers
1
Created
Source

prelogger Build Status

Node Logger which supports prefixing log messages with metadata such as correlation IDs

Installation

npm install prelogger

Usage

Constructor

If you just want a simple string prefix like prefix message

var PreLogger = require('prelogger');
var logger = new PreLogger('prefix');

logger.log('message');

If you want a number of prefixes you can optionally construct Prelogger with an object

var PreLogger = require('prelogger');
var logger = new PreLogger({
    correlationId: 'id',
    workflow: 'wflow'
});

logger.log('message');

This would output correlationId:id workflow:wflow message

Contribute

Please fork this repo to make changes and then issue a pull request back to this repo. You can run the unit tests using npm test

Contributors

Daniel Parker (@rlgod)

Keywords

FAQs

Package last updated on 19 Oct 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc