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

pino

Package Overview
Dependencies
Maintainers
4
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 4.3.0 to 4.4.0

1

bin.js

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

levelFirst: arg('-l'),
forceColor: arg('-c'),
messageKey: messageKeyArg()

@@ -19,0 +20,0 @@ })).pipe(process.stdout)

@@ -100,2 +100,4 @@ # Table of Contents

message. Default: `msg`.
* `forceColor` (boolean): if set to `true`, will add color information to the formatted output
message. Default: `false`.

@@ -102,0 +104,0 @@ ### Example:

@@ -65,1 +65,13 @@ # CLI

```
If you would like to enforce the output to be color encoded you can specify the `-c` flag
`cat log | pino -c` will transform this:
```js
{"pid":14139,"hostname":"MacBook-Pro-3.home","level":30,"fooMessage":"hello world","time":1457537229339,"v":1}
```
Into this:
```sh
[2017-04-25T17:32:09.662Z] INFO (24280 on SP2): hello world
```

2

package.json
{
"name": "pino",
"version": "4.3.0",
"version": "4.4.0",
"description": "super fast, all natural json logger",

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

@@ -60,2 +60,3 @@ 'use strict'

var messageKey = opts && opts.messageKey
var forceColor = opts && opts.forceColor
messageKey = messageKey || 'msg'

@@ -71,3 +72,3 @@

ctx = new chalk.constructor({
enabled: !!(chalk.supportsColor && dest.isTTY)
enabled: !!((chalk.supportsColor && dest.isTTY) || forceColor)
})

@@ -74,0 +75,0 @@

@@ -43,2 +43,13 @@ 'use strict'

test('pino pretty force color on flag', function (t) {
t.plan(1)
var prettier = pretty({ forceColor: true })
prettier.pipe(split(function (line) {
t.ok(line.match(/.*\u001b\[32mINFO\u001b\[39m.*\u001b\[36mhello world\u001b\[39m$/), 'color coding information is encoded in the line')
return line
}))
var instance = pino(prettier)
instance.info('hello world')
})
test('pino transform can just parse the dates', function (t) {

@@ -45,0 +56,0 @@ t.plan(1)

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