Socket
Book a DemoInstallSign in
Socket

catlog

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

catlog

Logging utility withou pain

1.0.9
latest
Source
npmnpm
Version published
Weekly downloads
29
625%
Maintainers
1
Weekly downloads
 
Created
Source

catlog

Build Status Coverage Status

NPM

Modern log utility for node apps

  • debug utility like visionmedia/debug
  • full feature logging utilites
  • extensible logging frameworks
    • plugins like formatters and log handlers
    • event-driven logging activity
    • context-based configuration

Documentation

See more at http://robinqu.github.io/catlog.

TL;DR

Simple debug

Just like the popular visionmedia/debug.

const debug = require('catlog')('app:main');

debug('I am here');
debug('Hi, babe!');

But the log goes to other handlers (fs_handler as default) as well. So your debug info will have chances to be recorded by fs_handler in files, instead of being deserted if no DEBUG env is set.

Log, in levels

Behave like old-fashined log utilites.

const logger = require('catlog')();

logger.info('good news');
logger.warn('important notice');
logger.error('bad news');
logger.debug('verbose news');
//also have alias, as `log`
logger.log('bad news');

Configuration

All settings are shared in the same process. And configure it on logging context, using:

const logger = require('catlog')({
  methods: {
    foobar: {
      target: 'stdout',
      level: 70
    }
  },
  category: 'special_app'
});

License

MIT

Keywords

log

FAQs

Package last updated on 26 May 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.