Comments (1)
For myself i use follow patch:
From 17be42a38e8518d7e44698b9cc4692808b8026e0 Mon Sep 17 00:00:00 2001
From: tantra35 <[email protected]>
Date: Fri, 18 Sep 2015 17:54:16 +0300
Subject: [PATCH] Revert "add suport for unix domain sockets"
This reverts commit ea1bc845f652b1fd04d019a1d559c9ee9ebfe368.
add suport for unix domain sockets
---
lib/sender.js | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/lib/sender.js b/lib/sender.js
index e2b2fc6..2cad841 100644
--- a/lib/sender.js
+++ b/lib/sender.js
@@ -8,7 +8,7 @@ function FluentSender(tag, options){
options = options || {};
this.tag = tag;
this.host = options.host || 'localhost';
- this.port = options.port || 24224;
+ this.port = options.port || null;
this.timeout = options.timeout || 3.0;
this.verbose = this.verbose || false;
this._timeResolution = options.milliseconds ? 1 : 1000;
@@ -41,8 +41,11 @@ FluentSender.prototype.emit = function(/*[label] <data>, [timestamp], [callback]
self._sendQueue.push(item);
self._sendQueueTail++;
- self._connect(function(){
- self._flushSendQueue();
+ self._connect(function(err){
+ if(!err)
+ {
+ self._flushSendQueue();
+ };
});
};
@@ -102,12 +105,23 @@ FluentSender.prototype._connect = function(callback){
if( self._socket ){
self._socket.destroy();
self._socket = null;
- self._eventEmitter.emit('error', err);
+ callback(err);
+ //self._eventEmitter.emit('error', err);
}
});
- self._socket.connect(self.port, self.host, function(){
- callback();
- });
+
+ if(self.port)
+ {
+ self._socket.connect(self.port, self.host, function(){
+ callback();
+ });
+ }
+ else
+ {
+ self._socket.connect(self.host, function(){
+ callback();
+ });
+ }
}else{
if( !self._socket.writable ){
self._socket.destroy();
--
1.9.5.msysgit.0
from fluent-logger-node.
Related Issues (20)
- Logger write to socket after it died HOT 1
- A small team looking to iterate on fluent logger node lib HOT 1
- [BUG] Logging multiple tags in PackedForward corrupts packets!
- [BUG] Emit callbacks are re-called when error with ack from Fluent
- error TS2307: Cannot find module 'winston-transport'. HOT 3
- Sender has no support in TypeScript HOT 2
- EnableReconnect not available in winston transport
- App doesn't close when connection failed. HOT 1
- WinstonTransport types don't work anymore after latest release HOT 1
- Trouble with millisecond (or any sub-second) resolution (outdated protocol implementation?)
- Buffering the logs being send to fluentd when fluentd is not available
- Error events take too much time to emit when fluentd is not available HOT 2
- Failed to call _flushSendQueue() during frequent log emit HOT 1
- Sending via udp HOT 1
- Cannot find module 'fluent-logger'
- Cannot read property 'end' of undefined HOT 2
- fluentd winston color formatting doesnt work at transport level HOT 1
- Lambda timeout occurs when using the sender.end() function with setTimeout
- [PROPOSAL] Deprecate in favor of new Fluent Node Logger HOT 1
- MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unpipe listeners added to [FluentTransport]. Use emitter.setMaxListeners() to increase limit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluent-logger-node.