npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

logd

v4.0.1

Published

A powerful modular logging facility for node.js

Downloads

2,649

Readme

logd

A powerful modular logging facility for node.js

Core features:

  • Completely modular: log messages are packed into JSON objects and can be sent anywhere
  • Routing: log messages with different levels can be sent to different targets
  • Log source: log messages are tagged with the file and line where it was created
  • Configurable output: the output of messages can be limited to certain levels
  • Namespaces: all messages are part of user defined namespace which can be used for filtering

npm Travis node

Using Logd

In the main file of your application or library, import the module, define a namespace and set a transport for the log output.

import logd from 'logd';
import ConsoleTransport from 'logd-console-transport';


// if this isn't code loaded by another application
// you should define a transport that is used for output
logd.transport(new ConsoleTransport());


// define the module we're logging from
const log = logd.module('my-service');


// start logging
log.info('some information');


// you may pass as many arguments as you like 
// to the log methods
log.error('something went wrong', err, {some: 'data'});


// if you just want to output temporary logs to the console
// that are not sent to any transport you may pass
// directly data to the module by invoking it directly
log(err, {an: 'object'}, 'direct to console logging ftw ;)');