Socket
Socket
Sign inDemoInstall

chatty

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    chatty

Sexy syslogging for node.js


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Chatty

Sexy syslogging for node.js

Install

npm install chatty

Usage

Manual
var chatty = require('chatty');

chatty.info('Hello');
Express
var express = require('express');
var chatty = require('chatty');

app.use(express.logger({ stream: chatty.stream() }));

app.get('/', function (req, res) {
  res.send('Hello');
});

app.listen(3000);

API

chatty.info(data)

Syslog with LOG_INFO priority

chatty.error(data)

Syslog with LOG_ERR priority

chatty.debug(data)

Syslog with LOG_DEBUG priority

chatty.stream(priority, options)

Return a syslog stream wrapper with specified priority.

priority can be either a syslog priority or any of the strings: info, error or debug. (LOG_INFO by default)

options is merged with the default and passed into the stream constructor

chatty.configure(options)

Configure chatty, availiable options are: ident, option and facility (syslog man page) An extra option console, may be set to true to log messages with console.log rather than syslog (useful for development/debugging)

chatty.log(priority, data)

Direct wrapper of syslog (you probably DON'T want this).

priority must be a syslog.prority int

Keywords

FAQs

Last updated on 18 Dec 2013

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc