Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fluent-logger

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluent-logger - npm Package Compare versions

Comparing version 0.2.6 to 0.3.0

#package.json#

3

lib/index.js

@@ -0,3 +1,4 @@

'use strict';
var FluentSender = require('./sender').FluentSender;
var sender = new FluentSender('debug');

@@ -4,0 +5,0 @@

@@ -0,1 +1,2 @@

'use strict';
/**

@@ -2,0 +3,0 @@ * log4js appender support

@@ -0,4 +1,5 @@

'use strict';
var util = require('util');
var EventEmitter = require('events').EventEmitter;
var pack = require('msgpack').pack;
var pack = require('msgpack5')().encode;
var net = require('net');

@@ -83,4 +84,3 @@

if (typeof time != "number") {
var dateTime = time || new Date();
time = dateTime.getTime() / this._timeResolution;
time = (time ? time.getTime() : Date.now()) / this._timeResolution;
}

@@ -87,0 +87,0 @@

@@ -0,4 +1,5 @@

'use strict';
var net = require('net');
var fs = require('fs');
var msgpack = require('msgpack');
var msgpack = require('msgpack5')();

@@ -16,4 +17,6 @@ function MockFluentdServer(){

});
var ms = new msgpack.Stream(socket);
ms.on('msg', function(m){
var decoder = msgpack.decoder();
socket.pipe(decoder);
decoder.on('data', function(m) {
self._received.push({

@@ -20,0 +23,0 @@ tag: m[0],

{
"name": "fluent-logger",
"version": "0.2.6",
"main": "./lib/index.js",
"scripts": {
"test": "./node_modules/.bin/mocha -t 10000 --recursive"
},
"author": {
"name": "Yohei Sasaki",
"email": "yssk22@gmail.com",
"url": "http://github.com/yssk22"
},
"repository": {
"type": "git",
"url": "http://github.com/fluent/fluent-logger-node"
},
"dependencies": {
"msgpack": ""
},
"devDependencies": {
"mocha": "",
"chai": "",
"log4js": "",
"async": ""
},
"licenses": [{
"type" : "Apache",
"url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
}],
"keywords": ["logger", "fluent"]
"name": "fluent-logger",
"version": "0.3.0",
"main": "./lib/index.js",
"scripts": {
"test": "./node_modules/.bin/mocha -t 10000 --recursive"
},
"author": {
"name": "Yohei Sasaki",
"email": "yssk22@gmail.com",
"url": "http://github.com/yssk22"
},
"contributors": [
{
"name": "Eduardo Silva",
"email": "eduardo@treasure-data.com",
"url": "http://edsiper.linuxchile.cl"
}
],
"repository": {
"type": "git",
"url": "http://github.com/fluent/fluent-logger-node"
},
"engines": {
"node": ">=0.10.30 < 4"
},
"dependencies": {
"msgpack": "0.2.7",
"msgpack5": "^3.1.0"
},
"devDependencies": {
"mocha": "",
"chai": "",
"log4js": "",
"async": ""
},
"licenses": [
{
"type": "Apache",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
],
"keywords": [
"logger",
"fluent",
"fluentd"
]
}

@@ -1,4 +0,4 @@

# fluent-logger for node.js
# fluent-logger for Node.js
fluent-logger implementation for node.js inspired by [fluent-logger-python].
fluent-logger implementation for Node.js inspired by [fluent-logger-python].

@@ -10,3 +10,3 @@ [![Build Status](https://secure.travis-ci.org/fluent/fluent-logger-node.png?branch=master,develop)](http://travis-ci.org/fluent/fluent-logger-node)

$ npm install fluent-logger
## Prerequistes

@@ -18,3 +18,3 @@

### Send an event record to fluentd
### Send an event record to Fluentd

@@ -26,19 +26,19 @@ Singleton style

logger.configure('tag', {
host: 'localhost',
host: 'localhost',
port: 24224,
timeout: 3.0
});
// send an event record with 'tag.label'
logger.emit('label', {record: 'this is a log'});
Instance style
var logger = require('fluent-logger').createFluentSender('tag', {
host: 'localhost',
host: 'localhost',
port: 24224,
timeout: 3.0
});
The emit method has following signature

@@ -55,3 +55,3 @@

Befre using [log4js] support, you should install it IN YOUR APPLICATION.
Before using [log4js] support, you should install it IN YOUR APPLICATION.

@@ -65,3 +65,3 @@

}));
var logger = log4js.getLogger('foo');

@@ -76,1 +76,5 @@ logger.info('this log record is sent to fluent daemon');

## Abour NodeJS versions
This package is compatible with NodeJS versions < 4.0. If you are using newer versions of NodeJS (e.g: 4.1), please checkout the branch [nodejs-4](https://github.com/fluent/fluent-logger-node/tree/nodejs-4).

@@ -118,7 +118,13 @@ var expect = require('chai').expect;

s.emit('foo', 'bar', function(){
// connected.
// capture ECONNRESET when closing server
s.on('error', function(err){
if (err.code === 'ECONNRESET') return;
throw err;
});
server.close(function(){
// waiting for the server closing all client socket.
(function waitForUnwritable(){
if( !s._socket.writable ){
if( !(s._socket && s._socket.writable) ){
runServer(function(_server2, finish){

@@ -257,3 +263,2 @@ s.port = _server2.port; // in actuall case, s.port does not need to be updated.

// Internal behavior test.

@@ -260,0 +265,0 @@ it('should not flush queue if existing connection is unavailable.', function(done){

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc