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

pino

Package Overview
Dependencies
Maintainers
2
Versions
311
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 2.7.2 to 2.7.3

2

package.json
{
"name": "pino",
"version": "2.7.2",
"version": "2.7.3",
"description": "fast and simple logger",

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

@@ -83,3 +83,3 @@ #! /usr/bin/env node

// pass through
return line
return line + '\n'
}

@@ -86,0 +86,0 @@

@@ -213,7 +213,7 @@ # pino  [![Build Status](https://travis-ci.org/mcollina/pino.svg)](https://travis-ci.org/mcollina/pino) [![Coverage Status](https://coveralls.io/repos/github/mcollina/pino/badge.svg?branch=master)](https://coveralls.io/github/mcollina/pino?branch=master) [![TypeScript definitions on DefinitelyTyped](http://definitelytyped.org/badges/standard.svg)](http://definitelytyped.org)

var pino = require('pino')
var logger = ({
var logger = pino({
name: 'myapp',
safe: true,
serializers: {
req: pino.stdSerializers.req
req: pino.stdSerializers.req,
res: pino.stdSerializers.res

@@ -781,2 +781,23 @@ }

<a name="pino-syslog"></a>
### pino-syslog
[pino-syslog][pino-syslog] is a transport, really a "transform," that converts
*pino's* logs to [RFC3164][rfc3164] compatible log messages. *pino-syslog* does not
forward the logs anywhere, it merely re-writes the messages to `stdout`. But
in combination with *pino-socket*, you can relay logs to a syslog server:
```sh
$ node yourapp.js | pino-syslog | pino-socket -a syslog.example.com
```
Example output for the "hello world" log:
```
<134>Apr 1 16:44:58 MacBook-Pro-3 none[94473]: {"pid":94473,"hostname":"MacBook-Pro-3","level":30,"msg":"hello world","time":1459529098958,"v":1}
```
[pino-syslog]: https://www.npmjs.com/package/pino-syslog
[rfc3164]: https://tools.ietf.org/html/rfc3164
#### Logstash

@@ -783,0 +804,0 @@

@@ -54,1 +54,16 @@ 'use strict'

})
test('pino transform preserve output if not valid JSON', function (t) {
t.plan(1)
var pretty = pino.pretty()
var lines = []
pretty.pipe(split(function (line) {
lines.push(line)
return line
}))
pretty.write('this is not json\nit\'s just regular output\n')
pretty.end()
t.deepEqual(lines, ['this is not json', 'it\'s just regular output'], 'preserved lines')
})
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