Socket
Socket
Sign inDemoInstall

pino

Package Overview
Dependencies
Maintainers
2
Versions
310
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

2

package.json
{
"name": "pino",
"version": "0.4.1",
"version": "0.4.2",
"description": "fast and simple logger",

@@ -5,0 +5,0 @@ "main": "pino.js",

@@ -13,2 +13,3 @@ # pino

* [How do I rotate log files?](#rotate)
* [How to use Transports with Pino](#transports)
* [Acknowledgements](#acknowledgements)

@@ -303,2 +304,34 @@ * [License](#license)

<a name="transports"></a>
## How to use Transports with Pino
Transports are not part of Pino. There will never be an API for transports,
or support for ObjectMode Writable streams.
This library is fast because it does way less than the others. We went
to great lengths to make sure this library is _really fast_, and transports
will slow things down.
So, how do you do a transport? With Pino, we create a separate process for our transport and pipe to it.
It's the Unix philosophy.
Something like:
```js
var split = require('split2')
var pump = require('pump')
var through = require('through2')
var myTransport = through.obj(function (chunk, enc, cb) {
// do whatever you want here!
console.log(chunk)
cb()
}
pump(process.stdin, split2(JSON.parse), myTransport)
```
Using transports in the same process causes unnecessary load and slows down Node's single threaded event loop.
If you write a transport, let us know and we will add a link here!
<a name="acknowledgements"></a>

@@ -305,0 +338,0 @@ ## Acknowledgements

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