Skip to content

Commit

Permalink
use rfc3339/iso8601 timestamps instead
Browse files Browse the repository at this point in the history
  • Loading branch information
max-mapper committed Sep 11, 2011
1 parent 85a4561 commit c2e4ed4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/couchdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ var winston = require('../lib/winston');
//
//
// The Console transport will simply output to the console screen
// The Couchdb tranports will perform an HTTP POST request to the specific CouchDB instances
// 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' }),
new (winston.transports.Couchdb)({ 'user': 'admin', 'pass': 'admin', 'host': 'example.iriscouch.com', 'db': 'logs' })
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' })
]
});

Expand Down
2 changes: 1 addition & 1 deletion lib/winston/transports/couchdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Couchdb.prototype.log = function (level, msg, meta, callback) {
req.write(JSON.stringify({
method: 'log',
params: {
timestamp: common.timestamp(),
timestamp: new Date(), // RFC3339/ISO8601 format instead of common.timestamp()
msg: msg,
level: level,
meta: meta
Expand Down

0 comments on commit c2e4ed4

Please sign in to comment.