Permalink
Browse files

use rfc3339/iso8601 timestamps instead

  • Loading branch information...
1 parent 7b6ed39 commit a4ef740aaea2a724d18ddc845bf69fabf29e566b @maxogden maxogden committed with indexzero Sep 11, 2011
Showing with 4 additions and 4 deletions.
  1. +3 −3 examples/couchdb.js
  2. +1 −1 lib/winston/transports/couchdb.js
View
@@ -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' })
]
});
@@ -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

0 comments on commit a4ef740

Please sign in to comment.