node-logentries
Advanced tools
Comparing version 0.0.2 to 0.1.0
@@ -1,3 +0,5 @@ | ||
/* Copyright (c) 2011 Richard Rodger */ | ||
/* Copyright (c) 2011-2013 Richard Rodger, BSD License */ | ||
"use strict"; | ||
var util = require('util') | ||
@@ -19,3 +21,2 @@ var http = require('http') | ||
function process() { | ||
while( 0 < queue.length ) { | ||
@@ -111,3 +112,3 @@ var entry = queue[0] | ||
self.end = function() { | ||
if( connected && req ) { | ||
if( req ) { | ||
try { | ||
@@ -167,3 +168,3 @@ req.end() | ||
for( level in self.levels ) { | ||
for( var level in self.levels ) { | ||
if( !({log:1,end:1,level:1,levels:1,on:1,once:1}[level]) ) { | ||
@@ -205,9 +206,11 @@ self[level] = function(level) { | ||
} | ||
//Replace newlines with unicode line separator | ||
args[1] = args[1].replace(/\n/g, "\u2028"); | ||
if (timestamp) { | ||
t = new Date().toISOString(); | ||
var t = new Date().toISOString(); | ||
args.unshift(t); | ||
} | ||
//console.log('args: ', args); | ||
queue.push(args) | ||
@@ -253,2 +256,4 @@ transport.consume() | ||
var LogentriesLogger = winston.transports.LogentriesLogger = function (options) { | ||
options = options || {} | ||
this.name = 'logentries'; | ||
@@ -255,0 +260,0 @@ |
@@ -5,7 +5,8 @@ { | ||
"keywords": ["log", "logging", "winston", "logentries", "logentries.com", "wrapper","api"], | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"homepage": "https://github.com/rjrodger/node-logentries", | ||
"author": "Richard Rodger <richard@chartaca.com> (http://richardrodger.com/)", | ||
"author": "Richard Rodger <richard@ricebridge.com> (http://richardrodger.com/)", | ||
"contributors": [ | ||
"Richard Rodger <richard@chartaca.com> (http://richardrodger.com/)" | ||
"Richard Rodger (http://richardrodger.com)", | ||
"Mark Lacomber (https://github.com/MarkLC)" | ||
], | ||
@@ -12,0 +13,0 @@ "dependencies": { |
@@ -7,3 +7,3 @@ # node-logentries | ||
Current Version: 0.0.1 | ||
Current Version: 0.0.2 | ||
@@ -292,5 +292,5 @@ Tested on: node 0.4.9 | ||
The unit tests use [expresso](https://github.com/visionmedia/expresso), and are in the _test_ folder. | ||
The unit tests use [mocha](http://visionmedia.github.com/mocha/), and are in the _test_ folder. | ||
expresso test | ||
mocha test/logentries.test.js | ||
@@ -297,0 +297,0 @@ The acceptance tests (these push actual data to the live logentries.com service) are simple node scripts, and are in the _accept_ folder. |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17473
219
1