Sha256: ffa3d585282afd7d483fcceae261a615393f2ba707e9e75aab30ce7548387584

Contents?: true

Size: 675 Bytes

Versions: 21

Compression:

Stored size: 675 Bytes

Contents

var winston = require('../lib/winston');

//
// Create a new winston logger instance with two tranports: Console, and Couchdb
//
//
// The Console transport will simply output to the console screen
// The Couchdb tranport will perform an HTTP POST request to the specified CouchDB instance
//
var logger = new (winston.Logger)({
  transports: [
    new (winston.transports.Console)(),
    new (winston.transports.Couchdb)({ 'host': 'localhost', 'db': 'logs' })
    // if you need auth do this: new (winston.transports.Couchdb)({ 'user': 'admin', 'pass': 'admin', 'host': 'localhost', 'db': 'logs' })
  ]
});

logger.log('info', 'Hello webhook log files!', { 'foo': 'bar' });

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
ela-4.1.6 node_modules/winston/examples/couchdb.js
ela-4.1.5 node_modules/winston/examples/couchdb.js
ela-4.1.4 node_modules/winston/examples/couchdb.js
ela-4.1.3 node_modules/winston/examples/couchdb.js
ela-4.1.2 node_modules/winston/examples/couchdb.js
ela-4.1.1 node_modules/winston/examples/couchdb.js
ela-4.1.0 node_modules/winston/examples/couchdb.js
ela-4.0.0 node_modules/winston/examples/couchdb.js
ela-3.4.3 node_modules/winston/examples/couchdb.js
ela-3.4.2 node_modules/winston/examples/couchdb.js
ela-3.4.0 node_modules/winston/examples/couchdb.js
ela-3.3.1 node_modules/winston/examples/couchdb.js
ela-3.3.0 node_modules/winston/examples/couchdb.js
ela-3.2.0 node_modules/winston/examples/couchdb.js
ela-3.1.1 node_modules/winston/examples/couchdb.js
ela-3.1.0 node_modules/winston/examples/couchdb.js
ela-3.0.0 node_modules/winston/examples/couchdb.js
ela-2.0.0 node_modules/winston/examples/couchdb.js
ela-1.1.0 node_modules/winston/examples/couchdb.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/winston/examples/couchdb.js