Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

logwrangler

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logwrangler

Wrangle up your logging

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

logwrangler is a module logging system that you can easily extend to add various logging locations and functions.

Install

npm install --save logwrangler

Use

Logging to stdout

var logwrangler = require('../index');
var logger = logwrangler.create();

logger.log({
	level: logger.levels.INFO,
	ns: 'web server',
	message: 'some log message',
	data: {}
});

Custom logging handler

var logger = fancyLog.create({
	level: fancyLog.levels.DEBUG, // default level to log
});

logger.use(function(options, data){
	/*
		options = {
			level: <default log level, string>
		};

		data = {
			level: <log level>,
			ns: <namespace, string>,
			ident: <custom identifier, string>,
			message: <message, string>,
			data: <custom data, object>
		};
	*/
	
	// do something with your data
});

Keywords

FAQs

Package last updated on 06 Jun 2014

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