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 🙏

© 2026 – Pkg Stats / Ryan Hefner

winston-cloudant

v2.1.6

Published

A simple Winston transport for IBM Cloudant NoSQL Db

Readme

Cloudant NoSQL DB Transport for Winston

The winston-cloudant module allows you to log your winston messages to IBM's Cloudant NoSQL DB.

const winston = require('winston');
const WinstonCloudant = require('winston-cloudant');

const logger = winston.createLogger({
    transports: [
        new cloudantTransport({
            url: '...',
            db: '...'
        })
    ]
});

Installation

  $ npm install --save winston-cloudant

Usage

Winston-cloudant is just like any other transport for winston. When adding it to winston, it takes some options so that it knows where to log to Cloudant.

Note that the latest version of this transport is made for winston 3.0 and up. If using older version of winston, please use older version (1.x) of this library.

The Cloudant NoSQL DB transport takes the following options:

url         : Access url including user and password
username    : Username for the Cloudant DB instance
password    : Password for the Cloudant DB instance
host        : Host for the Cloudant DB instance
iamApiKey   : IAM session cookie
db          : Name of the databasename to put logs in
logstash    : Write logs in logstash format

url

The access url for a Cloudant DB instance can be retreived from IBM Cloud portal under Service credentials. The url option is equivalent to and, if provided, used in precedence of username/password/host.

username

The username for a Cloudant DB instance can be retreived from IBM Cloud portal under Service credentials.

password

The password for a Cloudant DB instance can be retreived from IBM Cloud portal under Service credentials.

host

The host for a Cloudant DB instance can be retreived from IBM Cloud portal under Service credentials.

iamApiKey

Used in conjection with url (without credentials) for token based login to iam-based Cloudant services instead of basic auth (username and password).

db

The name of the database where logs should be writen. Default if none priveded is winston-cloudant.

logstash

True or false indicating logs to be writen in logstash format. Default is false.

Result

In your Cloudant instance a new database will be created with the specified name containing a new document for each log. The timestamp will be in the root level of the document and thus aid in sorting. The child node params will vary in formatting depending on the logstash flag but always contain the log itself along with some metadata.

Author

Written by Håkan Öström