Comments (10)
from pino-socket.
I can see the benefit. But then you get into the discussion in pinojs/pino#41. The question is really, is it better to drop logs or potentially send incomplete log "lines"?
Hmmm, having written that it occurs to me that since pino-socket
already expects to receive a LF as a delimiter before forwarding. So that could be used to stick the chunks into a fixed length FIFO buffer.
As for the actual issue of automatic reconnect. In the default mode, UDP, this shouldn't be an issue; it's just throwing packets out into the ether and whatever happens, happens.
from pino-socket.
So, this is just for TCP. I think we should just skip the lines while the connection went down for now. The problem with current setup is that pino-socket would crash the upstream process if the connection goes down.
from pino-socket.
I have an idea on solving the tcp reconnect issue. I'll be working on it soon.
from pino-socket.
Okay, I've implemented some sort of tcp reconnecting on the develop
branch. Please give it a review and test it in your situation. I'm fairly certain it needs more work before a release.
from pino-socket.
It does what's advertised, let's package that up and release :)
from pino-socket.
Did you have any issues with shutting down the local process?
from pino-socket.
shrug If so it can be fixed in 0.4.1 or 0.5.0. The reconnect feature is now published in 0.4.0.
from pino-socket.
@jsumners I didn't, is that an issue? which version of node?
from pino-socket.
It was just something I experienced during a local test. It was most likely a fault of mine.
from pino-socket.
Related Issues (20)
- Convert test suite to tap
- Support DNS HOT 2
- Syslog Format Support HOT 1
- Is `close` a valid Writable stream option? HOT 3
- Unable to get udp working HOT 1
- Remove pino-abstract-transport and just use a Writable stream
- CLI seems broken HOT 2
- CI is failing HOT 6
- Backoff strategy should be instantiated only once and reset when the connection is established again HOT 2
- [Feature idea] Introduce a FIFO queue with a max size to store data when the TCP socket write is unsuccessful HOT 3
- Logs are not sent if the TCP server wasn't available when the logger was initialized HOT 5
- onSocketClose option cannot be used with ThreadStream (multistream) HOT 5
- Emit a socketClose event instead of defining onSocketClose callback HOT 1
- Allow to configure the backoff strategy using primitive data types HOT 3
- Callback to manipulate the message before send? HOT 1
- Uncaught exception 'send EMSGSIZE' HOT 5
- Package validation and quality checking are failed because of sensitive data (test/certs/server.key) HOT 3
- Data lost on reconnect even with recovery enabled HOT 3
- Unix socket example
- Unix socket example HOT 4
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 pino-socket.